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

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

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

n = A("n")
b = B("b")
j = C("j")
k = B("k")
f = B("f")
e = A("e")
l = C("l")
a = C("a")
m = B("m")
i = A("i")

n.z = j
n.s = i
b.y = e
b.t = m
b.u = l
j.z = e
k.y = e
k.t = f
k.u = l
f.y = e
f.t = b
f.u = j
e.z = l
e.s = i
l.z = e
a.z = i
m.y = i
m.t = k
m.u = l
i.z = j
i.s = n
assert m.u.z.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

n = A("n")
b = B("b")
j = C("j")
k = B("k")
f = B("f")
e = A("e")
l = C("l")
a = C("a")
m = B("m")
i = A("i")

n.z = j
n.s = i
b.y = e
b.t = m
b.u = l
j.z = e
k.y = e
k.t = f
k.u = l
f.y = e
f.t = b
f.u = j
e.z = l
e.s = i
l.z = e
a.z = i
m.y = i
m.t = k
m.u = l
i.z = j
i.s = n
assert m.u.z.z.z.z.txt == "l"