class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.u: C = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.t: E = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

a = A("a")
i = B("i")
f = C("f")
d = D("d")
l = E("l")
b = B("b")
m = C("m")
e = C("e")
n = E("n")

a.v = d
i.s = n
i.x = d
i.t = d
f.r = b
f.z = d
f.u = e
f.o = e
f.y = m
d.q = a
d.u = i
l.w = d
l.v = d
l.s = d
l.y = f
l.t = n
b.s = l
b.x = d
b.t = d
m.r = i
m.z = d
m.u = e
m.o = e
m.y = f
e.r = b
e.z = d
e.u = m
e.y = m
e.o = f
n.w = d
n.v = d
n.s = d
n.y = f
n.t = l
assert a.v.q.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.u: C = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.t: E = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

a = A("a")
i = B("i")
f = C("f")
d = D("d")
l = E("l")
b = B("b")
m = C("m")
e = C("e")
n = E("n")

a.v = d
i.s = n
i.x = d
i.t = d
f.r = b
f.z = d
f.u = e
f.o = e
f.y = m
d.q = a
d.u = i
l.w = d
l.v = d
l.s = d
l.y = f
l.t = n
b.s = l
b.x = d
b.t = d
m.r = i
m.z = d
m.u = e
m.o = e
m.y = f
e.r = b
e.z = d
e.u = m
e.y = m
e.o = f
n.w = d
n.v = d
n.s = d
n.y = f
n.t = l
assert a.v.q.v.q.txt == "a"