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

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

k = A("k")
a = B("a")
n = B("n")
i = B("i")
e = B("e")
b = A("b")
l = B("l")
h = A("h")
f = B("f")

k.t = b
k.s = b
a.x = e
a.u = e
n.x = e
n.u = f
i.x = e
i.u = l
e.x = n
e.u = i
b.t = h
b.s = h
l.x = e
l.u = n
h.t = b
h.s = b
f.x = e
f.u = a
assert n.x.u.x.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

k = A("k")
a = B("a")
n = B("n")
i = B("i")
e = B("e")
b = A("b")
l = B("l")
h = A("h")
f = B("f")

k.t = b
k.s = b
a.x = e
a.u = e
n.x = e
n.u = f
i.x = e
i.u = l
e.x = n
e.u = i
b.t = h
b.s = h
l.x = e
l.u = n
h.t = b
h.s = b
f.x = e
f.u = a
assert n.x.u.x.u.x.txt == "e"