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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

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

a.q = k
a.t = n
a.x = i
a.u = e
a.s = j
k.y = n
k.o = a
k.p = f
j.z = f
f.r = i
f.p = d
i.x = d
i.v = d
i.s = k
i.y = j
n.q = k
n.t = e
n.u = e
n.x = d
n.s = l
e.q = k
e.t = a
e.u = a
e.x = d
e.s = m
d.x = i
d.v = i
d.s = k
d.y = j
m.z = f
l.z = f
assert e.q.o.s.txt == "j"