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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.r: E = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.r: E = None
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

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

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

k.p = n
k.u = a
k.z = e
l.t = g
l.z = b
l.s = b
b.w = d
b.t = m
b.y = m
b.r = g
b.z = l
d.r = m
d.v = m
g.s = k
g.q = k
g.o = m
n.t = g
n.z = m
n.s = m
e.p = n
e.u = a
e.z = i
a.t = g
a.z = m
a.s = b
i.p = n
i.u = l
i.z = k
m.w = d
m.t = b
m.y = b
m.r = g
m.z = n
assert i.z.p.s.t.w.r.r.o.txt == "m"