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

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

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

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

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

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

e.u = l
e.t = k
b.x = n
b.u = h
l.u = h
l.t = e
k.u = e
k.t = a
c.x = b
c.u = l
n.x = c
n.u = j
j.u = a
j.t = a
a.u = k
a.t = e
h.u = j
h.t = a
assert k.u.u.u.t.t.u.txt == "l"