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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.p: B = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

a = A("a")
l = B("l")
n = C("n")
g = D("g")
c = E("c")
h = D("h")
k = B("k")
b = B("b")
m = E("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.p: B = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

a = A("a")
l = B("l")
n = C("n")
g = D("g")
c = E("c")
h = D("h")
k = B("k")
b = B("b")
m = E("m")

a.q = b
a.v = c
a.x = c
a.o = m
a.y = h
l.o = a
l.p = m
l.x = b
l.z = h
n.r = m
n.y = h
n.x = h
n.w = g
g.t = k
g.y = n
g.s = n
g.p = l
g.r = h
c.s = n
c.x = m
c.u = a
h.t = k
h.p = k
h.y = n
h.s = n
h.r = g
k.o = a
k.p = c
k.x = b
k.z = g
b.o = a
b.p = m
b.x = l
b.z = g
m.s = n
m.x = c
m.u = a
assert a.o.u.q.x.z.r.p.x.txt == "b"