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

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

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

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

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

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

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

l.w = c
l.y = g
l.t = a
l.u = b
c.r = m
c.z = a
e.y = g
e.t = f
d.z = e
f.t = l
f.s = l
f.z = c
f.r = n
f.o = g
f.p = e
g.t = d
g.o = d
a.y = m
a.t = b
b.t = l
b.s = l
b.z = c
b.r = n
b.o = m
b.p = a
m.t = d
m.o = d
n.t = d
n.o = d
assert e.t.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

l.w = c
l.y = g
l.t = a
l.u = b
c.r = m
c.z = a
e.y = g
e.t = f
d.z = e
f.t = l
f.s = l
f.z = c
f.r = n
f.o = g
f.p = e
g.t = d
g.o = d
a.y = m
a.t = b
b.t = l
b.s = l
b.z = c
b.r = n
b.o = m
b.p = a
m.t = d
m.o = d
n.t = d
n.o = d
assert e.t.z.z.txt == "a"