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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

j.w = h
j.z = g
n.z = k
n.q = h
n.u = j
l.u = b
g.z = k
g.o = l
g.y = n
g.r = n
g.s = a
f.u = n
f.t = n
f.w = n
f.z = j
b.u = n
b.t = n
b.w = n
b.z = j
h.u = n
h.t = n
h.w = n
h.z = j
k.z = g
k.o = l
k.y = n
k.r = n
k.s = a
i.u = n
i.t = n
i.w = n
i.z = j
a.z = k
a.s = k
a.o = l
a.y = n
a.r = n
assert a.r.z.y.u.w.t.z.txt == "k"