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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.z: C = None
        self.v: B = None
        self.x: C = None
        self.txt = txt

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

n.t = j
n.p = g
n.o = g
n.w = b
n.s = l
l.s = b
e.p = m
i.x = l
i.o = g
i.y = g
i.p = n
g.s = n
g.w = b
g.z = b
g.x = b
g.v = l
d.t = i
d.p = g
d.o = g
d.w = b
d.s = l
b.p = i
j.x = l
j.o = g
j.y = g
j.p = d
m.x = l
m.o = g
m.y = g
m.p = d
assert l.s.p.y.v.s.p.p.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.w: C = None
        self.s: B = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.z: C = None
        self.v: B = None
        self.x: C = None
        self.txt = txt

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

n.t = j
n.p = g
n.o = g
n.w = b
n.s = l
l.s = b
e.p = m
i.x = l
i.o = g
i.y = g
i.p = n
g.s = n
g.w = b
g.z = b
g.x = b
g.v = l
d.t = i
d.p = g
d.o = g
d.w = b
d.s = l
b.p = i
j.x = l
j.o = g
j.y = g
j.p = d
m.x = l
m.o = g
m.y = g
m.p = d
assert l.s.p.y.v.s.p.p.w.p.txt == "i"