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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.w: D = None
        self.r: B = None
        self.v: A = None
        self.o: D = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.u: B = None
        self.y: C = None
        self.z: C = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.w: D = None
        self.r: B = None
        self.v: A = None
        self.o: D = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.u: B = None
        self.y: C = None
        self.z: C = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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