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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.x: B = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.x: E = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.x: B = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.x: E = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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