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

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

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

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

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

k = A("k")
e = B("e")
j = C("j")
a = D("a")
b = E("b")

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

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

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

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

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

k = A("k")
e = B("e")
j = C("j")
a = D("a")
b = E("b")

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