class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

l.r = b
l.p = k
l.z = k
l.o = f
c.v = n
k.s = b
f.v = c
f.u = l
f.p = n
b.x = l
b.o = k
b.r = k
b.p = k
b.t = c
n.v = c
n.u = l
n.p = f
assert b.x.r.t.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: C = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

l.r = b
l.p = k
l.z = k
l.o = f
c.v = n
k.s = b
f.v = c
f.u = l
f.p = n
b.x = l
b.o = k
b.r = k
b.p = k
b.t = c
n.v = c
n.u = l
n.p = f
assert b.x.r.t.v.u.txt == "l"