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

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

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

e = A("e")
d = B("d")
f = C("f")
k = B("k")
l = B("l")
i = A("i")
b = A("b")
h = A("h")
c = C("c")

e.v = d
e.p = d
d.t = c
f.z = c
f.p = c
f.o = l
k.t = c
l.t = f
i.v = l
i.p = d
b.v = l
b.p = d
h.v = l
h.p = l
c.z = f
c.p = f
c.o = d
assert c.o.t.o.t.z.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
f = C("f")
k = B("k")
l = B("l")
i = A("i")
b = A("b")
h = A("h")
c = C("c")

e.v = d
e.p = d
d.t = c
f.z = c
f.p = c
f.o = l
k.t = c
l.t = f
i.v = l
i.p = d
b.v = l
b.p = d
h.v = l
h.p = l
c.z = f
c.p = f
c.o = d
assert c.o.t.o.t.z.p.z.txt == "f"