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

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

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

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

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

m = A("m")
l = B("l")
g = C("g")
b = D("b")
k = E("k")
d = B("d")
n = D("n")

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

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

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

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

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

m = A("m")
l = B("l")
g = C("g")
b = D("b")
k = E("k")
d = B("d")
n = D("n")

m.o = g
m.u = g
m.x = g
m.y = n
m.q = k
l.q = d
l.r = g
g.t = k
g.w = m
g.r = m
g.x = n
b.y = m
b.r = g
b.p = g
b.s = g
b.t = k
k.s = m
k.u = m
k.x = g
k.q = g
d.q = l
d.r = g
n.y = m
n.r = g
n.p = g
n.s = g
n.t = k
assert n.t.q.x.t.x.t.s.txt == "m"