class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

k.y = n
n.z = e
n.u = e
n.o = g
n.w = l
n.p = k
e.y = a
m.s = g
m.x = g
m.z = e
d.z = k
d.p = a
d.v = e
d.o = g
g.y = n
a.s = g
a.x = g
a.z = e
j.z = e
j.u = e
j.o = k
j.w = n
j.p = g
l.z = e
l.u = e
l.o = k
l.w = j
l.p = g
assert l.z.y.s.y.p.y.txt == "n"