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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.t: C = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: D = None
        self.t: C = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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