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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: B = None
        self.y: D = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

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

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

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

e.z = a
n.r = f
n.z = m
l.o = j
l.t = j
l.q = m
l.y = f
l.u = e
f.z = j
f.p = a
j.q = b
j.t = b
j.z = l
j.p = n
i.r = a
i.z = m
m.r = f
m.z = i
b.z = a
g.z = f
a.z = j
a.p = f
assert a.z.t.z.z.p.r.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: B = None
        self.y: D = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

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

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

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

e.z = a
n.r = f
n.z = m
l.o = j
l.t = j
l.q = m
l.y = f
l.u = e
f.z = j
f.p = a
j.q = b
j.t = b
j.z = l
j.p = n
i.r = a
i.z = m
m.r = f
m.z = i
b.z = a
g.z = f
a.z = j
a.p = f
assert a.z.t.z.z.p.r.z.p.txt == "n"