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

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

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

h = A("h")
m = B("m")
c = C("c")
k = A("k")
n = A("n")
a = A("a")
b = C("b")
j = B("j")
e = B("e")

h.z = b
h.x = c
h.u = a
m.z = j
c.x = e
c.s = e
c.z = j
k.z = c
k.x = b
k.u = n
n.z = c
n.x = b
n.u = k
a.z = b
a.x = b
a.u = h
b.x = e
b.s = j
b.z = m
j.z = e
e.z = j
assert n.u.z.z.z.z.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: C = None
        self.u: A = None
        self.txt = txt

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

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

h = A("h")
m = B("m")
c = C("c")
k = A("k")
n = A("n")
a = A("a")
b = C("b")
j = B("j")
e = B("e")

h.z = b
h.x = c
h.u = a
m.z = j
c.x = e
c.s = e
c.z = j
k.z = c
k.x = b
k.u = n
n.z = c
n.x = b
n.u = k
a.z = b
a.x = b
a.u = h
b.x = e
b.s = j
b.z = m
j.z = e
e.z = j
assert n.u.z.z.z.z.z.z.z.txt == "e"