class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.z: B = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: A = None
        self.w: F = None
        self.y: D = None
        self.r: I = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.u: I = None
        self.t: A = None
        self.x: B = None
        self.y: E = None
        self.p: D = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.y: G = None
        self.v: F = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.z: F = None
        self.v: D = None
        self.x: D = None
        self.y: I = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.q: I = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.t: E = None
        self.s: C = None
        self.z: D = None
        self.p: G = None
        self.r: D = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

j = A("j")
a = B("a")
k = C("k")
e = D("e")
h = E("h")
d = F("d")
l = G("l")
i = H("i")
f = I("f")
b = D("b")

j.s = k
j.v = k
j.w = e
j.z = a
j.r = f
a.v = d
a.w = d
a.x = j
a.u = j
a.y = e
a.r = f
a.q = i
k.w = l
k.o = e
k.s = e
k.u = f
k.t = j
k.x = a
k.y = h
k.r = h
k.p = b
e.q = f
e.r = d
e.v = d
e.y = l
e.s = l
e.z = i
h.q = l
h.o = d
h.z = d
h.v = e
h.x = b
h.y = f
h.t = f
h.r = f
d.v = h
l.z = d
l.r = h
l.q = f
l.u = f
l.y = f
i.o = f
i.u = f
i.v = k
i.s = k
i.t = h
i.z = b
i.p = l
i.r = e
i.x = d
f.v = d
b.q = f
b.r = d
b.v = d
b.y = l
b.s = l
b.z = i
assert i.p.u.v.v.x.q.v.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.z: B = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: A = None
        self.w: F = None
        self.y: D = None
        self.r: I = None
        self.q: H = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.u: I = None
        self.t: A = None
        self.x: B = None
        self.y: E = None
        self.p: D = None
        self.r: E = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.y: G = None
        self.v: F = None
        self.s: G = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.z: F = None
        self.v: D = None
        self.x: D = None
        self.y: I = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: E = None
        self.q: I = None
        self.u: I = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.t: E = None
        self.s: C = None
        self.z: D = None
        self.p: G = None
        self.r: D = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

j = A("j")
a = B("a")
k = C("k")
e = D("e")
h = E("h")
d = F("d")
l = G("l")
i = H("i")
f = I("f")
b = D("b")

j.s = k
j.v = k
j.w = e
j.z = a
j.r = f
a.v = d
a.w = d
a.x = j
a.u = j
a.y = e
a.r = f
a.q = i
k.w = l
k.o = e
k.s = e
k.u = f
k.t = j
k.x = a
k.y = h
k.r = h
k.p = b
e.q = f
e.r = d
e.v = d
e.y = l
e.s = l
e.z = i
h.q = l
h.o = d
h.z = d
h.v = e
h.x = b
h.y = f
h.t = f
h.r = f
d.v = h
l.z = d
l.r = h
l.q = f
l.u = f
l.y = f
i.o = f
i.u = f
i.v = k
i.s = k
i.t = h
i.z = b
i.p = l
i.r = e
i.x = d
f.v = d
b.q = f
b.r = d
b.v = d
b.y = l
b.s = l
b.z = i
assert i.p.u.v.v.x.q.v.v.r.txt == "f"