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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.u: D = None
        self.w: B = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.u: D = None
        self.w: B = None
        self.q: A = None
        self.txt = txt

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

c.v = i
b.q = k
a.w = l
l.s = a
l.t = a
l.w = m
i.z = n
i.x = a
i.u = m
i.w = k
i.q = e
k.q = b
m.s = a
m.t = a
m.w = l
e.v = i
f.q = b
n.v = i
assert n.v.u.t.txt == "a"