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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.s: D = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

d.u = m
d.q = k
j.u = m
c.t = l
c.v = l
c.z = a
c.q = e
c.u = n
e.s = j
e.r = j
e.z = n
m.v = e
m.z = e
m.s = e
m.r = l
m.q = g
n.u = m
n.q = e
a.t = l
a.v = g
a.z = c
a.q = k
a.u = n
g.v = k
g.z = e
g.s = e
g.r = l
g.q = l
k.s = j
k.r = j
k.z = n
l.v = e
l.s = e
l.z = k
l.r = m
l.q = g
assert l.q.s.s.u.r.q.v.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.s: D = None
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

d.u = m
d.q = k
j.u = m
c.t = l
c.v = l
c.z = a
c.q = e
c.u = n
e.s = j
e.r = j
e.z = n
m.v = e
m.z = e
m.s = e
m.r = l
m.q = g
n.u = m
n.q = e
a.t = l
a.v = g
a.z = c
a.q = k
a.u = n
g.v = k
g.z = e
g.s = e
g.r = l
g.q = l
k.s = j
k.r = j
k.z = n
l.v = e
l.s = e
l.z = k
l.r = m
l.q = g
assert l.q.s.s.u.r.q.v.z.u.txt == "m"