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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

n = A("n")
a = B("a")
d = C("d")
f = D("f")
h = E("h")
g = A("g")
m = C("m")
e = E("e")

n.s = m
n.q = e
n.o = f
n.v = a
a.u = g
d.y = g
d.o = m
d.s = m
d.u = h
f.u = n
f.t = e
h.r = a
h.t = a
h.v = e
g.s = d
g.q = h
g.o = f
g.v = a
m.y = g
m.o = d
m.s = d
m.u = h
e.r = a
e.t = a
e.v = h
assert d.y.o.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: E = None
        self.t: B = None
        self.txt = txt

n = A("n")
a = B("a")
d = C("d")
f = D("f")
h = E("h")
g = A("g")
m = C("m")
e = E("e")

n.s = m
n.q = e
n.o = f
n.v = a
a.u = g
d.y = g
d.o = m
d.s = m
d.u = h
f.u = n
f.t = e
h.r = a
h.t = a
h.v = e
g.s = d
g.q = h
g.o = f
g.v = a
m.y = g
m.o = d
m.s = d
m.u = h
e.r = a
e.t = a
e.v = h
assert d.y.o.u.s.txt == "m"