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

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

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

n = A("n")
k = B("k")
i = C("i")
l = B("l")
e = C("e")
b = C("b")
j = B("j")
a = A("a")
d = A("d")

n.y = d
k.v = j
k.s = l
i.o = e
i.p = k
i.r = k
l.v = k
l.s = j
e.o = b
e.p = j
e.r = k
b.o = e
b.p = j
b.r = j
j.v = k
j.s = l
a.y = n
d.y = n
assert i.o.r.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

n = A("n")
k = B("k")
i = C("i")
l = B("l")
e = C("e")
b = C("b")
j = B("j")
a = A("a")
d = A("d")

n.y = d
k.v = j
k.s = l
i.o = e
i.p = k
i.r = k
l.v = k
l.s = j
e.o = b
e.p = j
e.r = k
b.o = e
b.p = j
b.r = j
j.v = k
j.s = l
a.y = n
d.y = n
assert i.o.r.s.s.s.txt == "l"