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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.s: B = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.s: B = None
        self.z: C = None
        self.txt = txt

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

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

j.x = g
j.r = a
j.o = d
j.z = e
j.u = e
g.t = a
g.q = d
a.t = j
a.y = e
a.o = g
a.v = g
h.u = a
h.v = a
h.z = a
h.s = g
d.o = k
b.t = a
b.q = d
n.x = b
n.r = a
n.o = d
n.z = k
n.u = e
k.u = a
k.v = a
k.z = a
k.s = g
e.u = a
e.v = a
e.z = a
e.s = b
assert e.z.y.s.q.o.s.q.txt == "d"