class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

c = A("c")
l = B("l")
n = C("n")
d = D("d")
e = E("e")
k = F("k")

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

c = A("c")
l = B("l")
n = C("n")
d = D("d")
e = E("e")
k = F("k")

c.u = l
c.s = e
c.o = e
c.p = e
l.o = k
n.q = c
d.y = c
d.z = n
d.w = n
d.q = e
d.u = e
d.t = e
e.r = n
e.p = k
e.t = c
e.o = d
e.u = d
e.z = l
k.x = l
k.z = l
assert e.p.z.o.z.txt == "l"