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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.u: C = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

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

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

d = A("d")
l = B("l")
k = C("k")
a = D("a")
f = E("f")
c = C("c")
m = D("m")

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

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

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.u: C = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

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

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

d = A("d")
l = B("l")
k = C("k")
a = D("a")
f = E("f")
c = C("c")
m = D("m")

d.y = a
d.u = c
d.t = k
d.r = l
l.p = f
k.v = c
k.u = c
k.y = c
k.x = m
k.r = l
a.u = m
a.t = f
f.s = c
f.x = c
f.r = l
f.p = d
c.v = k
c.u = k
c.y = k
c.x = m
c.r = l
m.u = a
m.t = f
assert m.u.u.t.txt == "f"