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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

l = A("l")
h = B("h")
a = C("a")
k = D("k")
d = E("d")
j = B("j")
n = B("n")
b = D("b")
m = E("m")
e = C("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

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

l = A("l")
h = B("h")
a = C("a")
k = D("k")
d = E("d")
j = B("j")
n = B("n")
b = D("b")
m = E("m")
e = C("e")

l.q = a
l.z = n
l.o = k
l.y = h
h.z = a
h.y = b
h.q = e
h.s = l
a.w = b
a.s = b
a.u = e
a.v = e
a.x = m
k.t = l
k.o = b
k.w = h
d.t = a
d.x = m
j.z = a
j.y = b
j.q = e
j.s = l
n.z = a
n.y = b
n.q = e
n.s = l
b.t = l
b.o = k
b.w = n
m.t = a
m.x = d
e.w = b
e.u = a
e.v = a
e.s = k
e.x = d
assert e.x.t.x.t.v.s.w.z.u.txt == "e"