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

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

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

n = A("n")
h = B("h")
c = C("c")
k = B("k")
e = A("e")
i = B("i")
a = C("a")

n.v = k
n.t = a
h.r = e
h.s = c
c.r = e
c.u = e
k.r = n
k.s = a
e.v = k
e.t = a
i.r = e
i.s = a
a.r = n
a.u = e
assert c.r.t.u.t.u.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
c = C("c")
k = B("k")
e = A("e")
i = B("i")
a = C("a")

n.v = k
n.t = a
h.r = e
h.s = c
c.r = e
c.u = e
k.r = n
k.s = a
e.v = k
e.t = a
i.r = e
i.s = a
a.r = n
a.u = e
assert c.r.t.u.t.u.t.u.txt == "e"