class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.o: E = None
        self.r: H = None
        self.y: E = None
        self.s: D = None
        self.v: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

i = A("i")
d = B("d")
k = C("k")
m = D("m")
n = E("n")
c = F("c")
e = G("e")
b = H("b")
j = F("j")

i.t = b
d.w = b
d.u = b
d.s = e
d.t = n
k.t = m
k.p = m
k.s = m
k.o = n
k.y = n
k.r = b
k.z = b
k.v = i
m.v = k
m.t = d
m.x = e
n.u = c
c.o = m
e.z = k
e.p = m
e.r = m
e.v = j
e.o = j
e.t = j
e.y = i
e.x = b
b.s = d
b.v = e
b.w = e
b.r = j
b.x = n
b.t = m
b.z = k
j.o = m
assert j.o.t.t.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.o: E = None
        self.r: H = None
        self.y: E = None
        self.s: D = None
        self.v: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

i = A("i")
d = B("d")
k = C("k")
m = D("m")
n = E("n")
c = F("c")
e = G("e")
b = H("b")
j = F("j")

i.t = b
d.w = b
d.u = b
d.s = e
d.t = n
k.t = m
k.p = m
k.s = m
k.o = n
k.y = n
k.r = b
k.z = b
k.v = i
m.v = k
m.t = d
m.x = e
n.u = c
c.o = m
e.z = k
e.p = m
e.r = m
e.v = j
e.o = j
e.t = j
e.y = i
e.x = b
b.s = d
b.v = e
b.w = e
b.r = j
b.x = n
b.t = m
b.z = k
j.o = m
assert j.o.t.t.u.o.txt == "m"