class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.r: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.r: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

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

k.w = i
k.o = h
d.z = h
d.p = h
d.y = j
j.v = n
j.y = n
j.w = a
j.r = k
j.p = i
e.s = i
e.x = i
e.o = a
n.o = j
n.q = d
n.p = d
n.v = m
i.v = n
i.y = n
i.w = a
i.r = k
i.p = j
b.s = i
b.x = j
b.o = a
a.w = j
a.o = d
h.z = d
h.p = d
h.y = j
m.o = i
m.q = d
m.p = d
m.v = n
assert n.q.y.p.w.o.y.v.txt == "n"