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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: E = None
        self.v: E = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: E = None
        self.v: E = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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