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

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

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

f = A("f")
a = B("a")
n = C("n")
j = C("j")
l = B("l")
h = A("h")
i = C("i")
g = A("g")
e = C("e")
c = B("c")

f.r = c
a.x = c
n.z = j
n.y = j
n.v = a
j.z = e
j.y = i
j.v = l
l.x = c
h.r = l
i.z = e
i.y = e
i.v = l
g.r = a
e.z = j
e.y = n
e.v = a
c.x = l
assert l.x.x.x.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

f = A("f")
a = B("a")
n = C("n")
j = C("j")
l = B("l")
h = A("h")
i = C("i")
g = A("g")
e = C("e")
c = B("c")

f.r = c
a.x = c
n.z = j
n.y = j
n.v = a
j.z = e
j.y = i
j.v = l
l.x = c
h.r = l
i.z = e
i.y = e
i.v = l
g.r = a
e.z = j
e.y = n
e.v = a
c.x = l
assert l.x.x.x.x.x.x.txt == "l"