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

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

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

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

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

f = A("f")
l = B("l")
n = C("n")
k = D("k")
j = E("j")
b = B("b")
a = E("a")

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

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

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

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

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

f = A("f")
l = B("l")
n = C("n")
k = D("k")
j = E("j")
b = B("b")
a = E("a")

f.z = j
f.r = j
f.o = k
f.t = l
f.s = b
l.t = k
l.o = a
l.q = a
l.z = b
n.o = b
n.z = b
k.u = n
k.r = f
j.w = k
j.u = k
j.x = l
j.o = n
j.r = a
b.t = k
b.o = a
b.z = l
b.q = j
a.w = k
a.u = k
a.x = l
a.o = n
a.r = j
assert b.o.r.x.o.r.u.txt == "k"