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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.p: C = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.r: F = None
        self.v: E = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

d = A("d")
f = B("f")
j = C("j")
g = D("g")
e = E("e")
l = F("l")
a = A("a")
b = E("b")

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: C = None
        self.p: C = None
        self.q: E = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: F = None
        self.r: F = None
        self.v: E = None
        self.q: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

d = A("d")
f = B("f")
j = C("j")
g = D("g")
e = E("e")
l = F("l")
a = A("a")
b = E("b")

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