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

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

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

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

a.w = b
l.p = b
j.y = l
j.t = l
j.u = k
e.w = b
h.w = b
c.w = k
k.y = l
k.t = l
k.u = b
i.y = l
i.t = l
i.u = j
b.y = l
b.t = l
b.u = k
assert c.w.u.t.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

a.w = b
l.p = b
j.y = l
j.t = l
j.u = k
e.w = b
h.w = b
c.w = k
k.y = l
k.t = l
k.u = b
i.y = l
i.t = l
i.u = j
b.y = l
b.t = l
b.u = k
assert c.w.u.t.p.t.txt == "l"