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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.t: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

m.o = e
m.q = e
e.v = n
h.p = f
h.q = d
h.u = e
h.x = a
a.p = e
a.z = e
a.t = k
a.u = l
n.s = e
n.u = l
n.p = k
d.p = f
d.q = h
d.u = e
d.x = g
g.p = e
g.z = e
g.t = k
g.u = l
k.s = e
k.u = n
k.p = l
f.p = d
f.q = h
f.u = e
f.x = a
l.s = e
l.u = k
l.p = n
assert g.z.v.s.v.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.t: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

m.o = e
m.q = e
e.v = n
h.p = f
h.q = d
h.u = e
h.x = a
a.p = e
a.z = e
a.t = k
a.u = l
n.s = e
n.u = l
n.p = k
d.p = f
d.q = h
d.u = e
d.x = g
g.p = e
g.z = e
g.t = k
g.u = l
k.s = e
k.u = n
k.p = l
f.p = d
f.q = h
f.u = e
f.x = a
l.s = e
l.u = k
l.p = n
assert g.z.v.s.v.s.v.txt == "n"