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

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

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

e = A("e")
l = B("l")
n = C("n")
k = C("k")
j = C("j")
i = A("i")
d = A("d")
g = C("g")
a = B("a")

e.w = n
e.u = i
e.q = i
l.o = i
l.u = k
l.z = a
n.o = i
n.z = e
n.y = d
k.o = d
k.z = d
k.y = e
j.o = e
j.z = i
j.y = d
i.w = k
i.u = d
i.q = d
d.w = k
d.u = i
d.q = e
g.o = d
g.y = d
g.z = i
a.o = d
a.u = k
a.z = l
assert l.z.o.w.z.w.z.w.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

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

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

e = A("e")
l = B("l")
n = C("n")
k = C("k")
j = C("j")
i = A("i")
d = A("d")
g = C("g")
a = B("a")

e.w = n
e.u = i
e.q = i
l.o = i
l.u = k
l.z = a
n.o = i
n.z = e
n.y = d
k.o = d
k.z = d
k.y = e
j.o = e
j.z = i
j.y = d
i.w = k
i.u = d
i.q = d
d.w = k
d.u = i
d.q = e
g.o = d
g.y = d
g.z = i
a.o = d
a.u = k
a.z = l
assert l.z.o.w.z.w.z.w.y.w.txt == "n"