class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: B = None
        self.y: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
n = D("n")
a = E("a")
d = E("d")
k = B("k")

e.t = n
e.u = n
e.z = l
e.y = f
l.v = d
l.t = f
f.r = e
f.y = n
n.u = d
a.v = d
a.x = f
d.v = a
d.x = f
k.v = d
k.t = f
assert d.v.x.r.y.y.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: B = None
        self.y: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
f = C("f")
n = D("n")
a = E("a")
d = E("d")
k = B("k")

e.t = n
e.u = n
e.z = l
e.y = f
l.v = d
l.t = f
f.r = e
f.y = n
n.u = d
a.v = d
a.x = f
d.v = a
d.x = f
k.v = d
k.t = f
assert d.v.x.r.y.y.u.v.txt == "a"