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

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

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

i = A("i")
h = B("h")
k = C("k")
n = C("n")
c = A("c")
j = A("j")
f = B("f")
l = B("l")

i.t = c
i.u = c
i.s = f
h.u = n
k.r = c
k.u = n
k.w = j
n.r = c
n.u = k
n.w = j
c.t = i
c.u = i
c.s = l
j.t = c
j.u = c
j.s = l
f.u = n
l.u = n
assert h.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

i = A("i")
h = B("h")
k = C("k")
n = C("n")
c = A("c")
j = A("j")
f = B("f")
l = B("l")

i.t = c
i.u = c
i.s = f
h.u = n
k.r = c
k.u = n
k.w = j
n.r = c
n.u = k
n.w = j
c.t = i
c.u = i
c.s = l
j.t = c
j.u = c
j.s = l
f.u = n
l.u = n
assert h.u.u.u.txt == "n"