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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.x: B = None
        self.q: C = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

m.s = h
m.p = c
h.q = i
h.r = l
h.z = n
k.v = h
k.u = n
k.q = n
k.x = l
k.t = m
e.p = m
e.y = c
e.x = d
e.r = d
j.u = m
j.y = m
i.u = c
i.y = c
n.v = l
n.u = k
n.q = k
n.x = h
n.t = m
c.s = h
c.p = m
d.p = c
d.y = c
d.x = e
d.r = e
l.q = i
l.r = h
l.z = n
assert e.p.p.s.z.u.t.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: B = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.x: B = None
        self.q: C = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

m.s = h
m.p = c
h.q = i
h.r = l
h.z = n
k.v = h
k.u = n
k.q = n
k.x = l
k.t = m
e.p = m
e.y = c
e.x = d
e.r = d
j.u = m
j.y = m
i.u = c
i.y = c
n.v = l
n.u = k
n.q = k
n.x = h
n.t = m
c.s = h
c.p = m
d.p = c
d.y = c
d.x = e
d.r = e
l.q = i
l.r = h
l.z = n
assert e.p.p.s.z.u.t.s.z.txt == "n"