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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.o: D = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: D = None
        self.w: A = None
        self.q: E = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.o: D = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: D = None
        self.w: A = None
        self.q: E = None
        self.y: A = None
        self.txt = txt

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

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