class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.s: G = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: J = None
        self.y: A = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.y: A = None
        self.t: B = None
        self.p: D = None
        self.z: I = None
        self.q: A = None
        self.w: H = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: A = None
        self.r: H = None
        self.u: J = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: J = None
        self.y: A = None
        self.x: G = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: B = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.y: A = None
        self.t: B = None
        self.p: D = None
        self.z: I = None
        self.q: A = None
        self.w: H = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: A = None
        self.r: H = None
        self.u: J = None
        self.q: E = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.txt = txt

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

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