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

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

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

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

k = A("k")
b = B("b")
a = C("a")
m = D("m")
d = C("d")
c = B("c")
e = C("e")
i = A("i")
l = C("l")
f = D("f")

k.o = l
k.t = l
k.u = i
b.p = d
b.v = m
b.y = f
a.s = m
m.p = e
m.t = c
m.u = c
m.y = a
d.s = f
c.p = l
c.v = m
c.y = m
e.s = m
i.o = e
i.t = l
i.u = k
l.s = m
f.p = a
f.y = a
f.t = b
f.u = c
assert c.p.s.p.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

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

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

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

k = A("k")
b = B("b")
a = C("a")
m = D("m")
d = C("d")
c = B("c")
e = C("e")
i = A("i")
l = C("l")
f = D("f")

k.o = l
k.t = l
k.u = i
b.p = d
b.v = m
b.y = f
a.s = m
m.p = e
m.t = c
m.u = c
m.y = a
d.s = f
c.p = l
c.v = m
c.y = m
e.s = m
i.o = e
i.t = l
i.u = k
l.s = m
f.p = a
f.y = a
f.t = b
f.u = c
assert c.p.s.p.s.p.txt == "e"