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

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

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

a = A("a")
k = B("k")
l = C("l")
g = B("g")
b = C("b")
m = B("m")
c = A("c")
i = C("i")
j = A("j")
d = C("d")

a.z = j
a.t = d
a.s = g
k.v = d
k.t = d
l.y = d
l.t = m
g.v = l
g.t = d
b.y = l
b.t = k
m.v = l
m.t = d
c.z = j
c.t = i
c.s = m
i.y = l
i.t = m
j.z = c
j.t = d
j.s = g
d.y = b
d.t = m
assert k.v.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: C = None
        self.s: B = None
        self.txt = txt

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

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

a = A("a")
k = B("k")
l = C("l")
g = B("g")
b = C("b")
m = B("m")
c = A("c")
i = C("i")
j = A("j")
d = C("d")

a.z = j
a.t = d
a.s = g
k.v = d
k.t = d
l.y = d
l.t = m
g.v = l
g.t = d
b.y = l
b.t = k
m.v = l
m.t = d
c.z = j
c.t = i
c.s = m
i.y = l
i.t = m
j.z = c
j.t = d
j.s = g
d.y = b
d.t = m
assert k.v.y.y.y.y.y.txt == "l"