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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.s: A = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.s: A = None
        self.p: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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