class A:
    def __init__(self, txt: str):
        self.v: D = 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.u: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

i.v = n
c.x = f
e.u = n
e.o = l
n.s = c
n.y = j
n.x = e
d.v = n
l.s = f
l.y = j
l.x = e
j.u = l
j.o = n
f.x = c
h.v = n
a.v = n
assert c.x.x.x.x.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = 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.u: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

i.v = n
c.x = f
e.u = n
e.o = l
n.s = c
n.y = j
n.x = e
d.v = n
l.s = f
l.y = j
l.x = e
j.u = l
j.o = n
f.x = c
h.v = n
a.v = n
assert c.x.x.x.x.x.x.x.txt == "f"