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

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

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

e = A("e")
f = B("f")
c = C("c")
j = B("j")
l = B("l")

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

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

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

e = A("e")
f = B("f")
c = C("c")
j = B("j")
l = B("l")

e.u = l
f.y = j
f.z = l
f.v = c
c.v = f
j.y = f
j.z = f
j.v = c
l.y = j
l.z = j
l.v = c
assert c.v.v.v.z.y.txt == "j"