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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

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

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

k.t = m
k.r = m
k.s = f
k.x = c
e.u = j
m.z = d
m.r = e
f.o = c
f.q = c
f.y = e
d.s = j
d.x = e
d.r = m
d.o = b
d.y = c
c.o = f
c.q = f
c.y = e
j.s = d
j.x = e
j.r = m
j.o = k
j.y = c
b.t = m
b.r = m
b.s = f
b.x = f
assert m.z.s.s.y.y.txt == "e"