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

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

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

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

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

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

n.p = h
n.w = h
n.x = k
n.o = l
n.v = b
b.v = k
i.y = b
i.w = l
k.u = i
e.r = i
e.z = c
e.u = a
l.r = i
l.z = c
l.u = e
a.r = i
a.z = k
a.u = e
c.u = i
m.p = n
m.w = n
m.x = c
m.o = l
m.v = b
h.p = n
h.w = n
h.x = k
h.o = l
h.v = b
assert a.r.y.v.u.w.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: D = None
        self.o: E = None
        self.w: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

n.p = h
n.w = h
n.x = k
n.o = l
n.v = b
b.v = k
i.y = b
i.w = l
k.u = i
e.r = i
e.z = c
e.u = a
l.r = i
l.z = c
l.u = e
a.r = i
a.z = k
a.u = e
c.u = i
m.p = n
m.w = n
m.x = c
m.o = l
m.v = b
h.p = n
h.w = n
h.x = k
h.o = l
h.v = b
assert a.r.y.v.u.w.u.u.txt == "a"