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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.p: B = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

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

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

n = A("n")
b = B("b")
i = C("i")
a = D("a")
g = E("g")
d = E("d")
k = D("k")
l = B("l")
j = E("j")
c = E("c")

n.y = j
n.p = i
n.r = i
b.o = i
b.r = i
b.t = j
b.p = l
b.y = l
i.o = k
i.s = k
i.x = a
i.y = c
a.q = i
a.z = i
a.t = i
a.p = k
a.w = n
g.t = n
g.u = n
g.p = j
d.t = n
d.u = n
d.p = g
k.q = i
k.z = i
k.t = i
k.p = a
k.w = n
l.o = i
l.r = i
l.t = j
l.p = b
l.y = b
j.t = n
j.u = n
j.p = c
c.t = n
c.u = n
c.p = d
assert l.t.p.p.u.y.p.t.r.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: E = None
        self.p: B = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

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

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

n = A("n")
b = B("b")
i = C("i")
a = D("a")
g = E("g")
d = E("d")
k = D("k")
l = B("l")
j = E("j")
c = E("c")

n.y = j
n.p = i
n.r = i
b.o = i
b.r = i
b.t = j
b.p = l
b.y = l
i.o = k
i.s = k
i.x = a
i.y = c
a.q = i
a.z = i
a.t = i
a.p = k
a.w = n
g.t = n
g.u = n
g.p = j
d.t = n
d.u = n
d.p = g
k.q = i
k.z = i
k.t = i
k.p = a
k.w = n
l.o = i
l.r = i
l.t = j
l.p = b
l.y = b
j.t = n
j.u = n
j.p = c
c.t = n
c.u = n
c.p = d
assert l.t.p.p.u.y.p.t.r.s.w.txt == "n"