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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: A = None
        self.t: D = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: A = None
        self.t: D = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

e.q = d
e.y = d
e.s = b
e.r = k
e.v = h
n.x = a
n.p = e
n.t = l
n.v = c
n.q = c
m.t = a
m.o = e
m.s = k
b.s = n
b.u = k
b.t = k
a.p = k
a.v = k
a.q = h
a.u = h
h.p = m
h.v = m
h.q = a
h.u = a
l.s = c
l.u = k
l.t = m
d.q = e
d.y = e
d.s = l
d.r = k
d.v = h
k.t = a
k.o = d
k.s = m
c.x = a
c.p = d
c.t = l
c.v = n
c.q = n
assert m.t.v.o.r.t.p.t.p.txt == "k"