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

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

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

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

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

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

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

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

i.t = j
i.u = e
n.y = i
n.v = j
n.o = c
j.z = l
j.u = l
j.t = l
c.t = j
c.u = e
l.t = j
l.u = n
e.y = l
e.v = j
e.o = i
assert e.o.t.z.txt == "l"