class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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