class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: C = None
        self.o: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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