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

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

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

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

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

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

j.z = i
j.q = k
j.v = a
j.s = l
i.v = n
i.x = l
i.p = e
i.r = a
m.v = e
m.y = e
m.x = a
e.w = j
e.q = l
g.r = m
g.q = j
g.w = i
a.r = m
a.q = j
a.w = i
n.v = e
n.y = e
n.x = a
k.z = i
k.q = j
k.v = a
k.s = e
l.w = j
l.q = e
assert a.q.q.s.q.w.s.q.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: A = None
        self.v: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

j.z = i
j.q = k
j.v = a
j.s = l
i.v = n
i.x = l
i.p = e
i.r = a
m.v = e
m.y = e
m.x = a
e.w = j
e.q = l
g.r = m
g.q = j
g.w = i
a.r = m
a.q = j
a.w = i
n.v = e
n.y = e
n.x = a
k.z = i
k.q = j
k.v = a
k.s = e
l.w = j
l.q = e
assert a.q.q.s.q.w.s.q.q.w.txt == "j"