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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.t: F = None
        self.v: D = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: E = None
        self.t: F = None
        self.v: D = None
        self.w: D = None
        self.o: F = None
        self.txt = txt

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

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