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

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

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

e = A("e")
i = B("i")
k = C("k")
l = A("l")
j = A("j")
g = A("g")
b = A("b")
h = A("h")
c = A("c")

e.r = k
e.t = i
i.z = e
k.u = i
k.r = i
k.s = i
l.r = k
l.t = i
j.r = k
j.t = i
g.r = k
g.t = i
b.r = k
b.t = i
h.r = k
h.t = i
c.r = k
c.t = i
assert e.t.z.r.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.txt = txt

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

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

e = A("e")
i = B("i")
k = C("k")
l = A("l")
j = A("j")
g = A("g")
b = A("b")
h = A("h")
c = A("c")

e.r = k
e.t = i
i.z = e
k.u = i
k.r = i
k.s = i
l.r = k
l.t = i
j.r = k
j.t = i
g.r = k
g.t = i
b.r = k
b.t = i
h.r = k
h.t = i
c.r = k
c.t = i
assert e.t.z.r.u.z.txt == "e"