class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.s: C = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
f = C("f")
h = D("h")
i = E("i")
m = E("m")
a = C("a")
k = B("k")

e.o = f
e.x = f
e.w = k
e.s = a
e.y = h
c.s = m
c.x = a
c.t = f
f.r = m
f.s = c
f.x = c
h.z = e
i.w = m
i.t = f
i.u = f
i.s = e
m.w = i
m.t = f
m.u = f
m.s = e
a.r = m
a.s = c
a.x = c
k.s = m
k.x = f
k.t = a
assert m.s.x.r.w.w.w.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.s: C = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
f = C("f")
h = D("h")
i = E("i")
m = E("m")
a = C("a")
k = B("k")

e.o = f
e.x = f
e.w = k
e.s = a
e.y = h
c.s = m
c.x = a
c.t = f
f.r = m
f.s = c
f.x = c
h.z = e
i.w = m
i.t = f
i.u = f
i.s = e
m.w = i
m.t = f
m.u = f
m.s = e
a.r = m
a.s = c
a.x = c
k.s = m
k.x = f
k.t = a
assert m.s.x.r.w.w.w.s.s.txt == "a"