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

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

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

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

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

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

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

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

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

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

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

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

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