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

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

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

l = A("l")
j = B("j")
i = C("i")
k = B("k")
e = C("e")

l.y = e
l.x = i
l.o = i
j.v = k
i.u = e
i.q = e
k.v = j
e.u = i
e.q = i
assert i.q.q.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.o: C = None
        self.txt = txt

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

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

l = A("l")
j = B("j")
i = C("i")
k = B("k")
e = C("e")

l.y = e
l.x = i
l.o = i
j.v = k
i.u = e
i.q = e
k.v = j
e.u = i
e.q = i
assert i.q.q.q.q.txt == "i"