class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: D = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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