class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: E = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: E = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

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

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

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