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

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

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

l = A("l")
e = B("e")
c = C("c")
i = C("i")
n = B("n")

l.v = c
l.o = c
l.p = n
e.u = n
e.v = c
c.z = l
c.o = l
c.s = n
i.z = l
i.o = l
i.s = e
n.u = e
n.v = c
assert e.v.o.v.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
c = C("c")
i = C("i")
n = B("n")

l.v = c
l.o = c
l.p = n
e.u = n
e.v = c
c.z = l
c.o = l
c.s = n
i.z = l
i.o = l
i.s = e
n.u = e
n.v = c
assert e.v.o.v.s.u.txt == "e"