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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.z: E = None
        self.x: D = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.z: D = None
        self.o: G = None
        self.s: D = None
        self.r: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.r: H = None
        self.s: A = None
        self.p: C = None
        self.v: H = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

e = A("e")
c = B("c")
a = C("a")
i = D("i")
k = E("k")
b = F("b")
d = G("d")
j = H("j")
m = D("m")

e.o = j
e.w = k
c.y = k
c.x = d
c.o = a
c.w = m
a.x = k
a.u = e
a.y = c
a.v = c
a.s = m
a.o = j
i.v = j
i.w = j
i.p = b
i.z = k
i.x = m
i.y = c
k.x = d
k.u = d
k.o = d
k.r = d
k.z = m
k.s = i
k.t = b
b.t = k
d.u = e
d.t = e
d.s = e
d.r = j
d.v = j
d.y = j
d.p = a
d.x = c
j.s = d
m.v = j
m.w = j
m.p = b
m.z = k
m.x = i
m.y = c
assert m.w.s.x.o.u.w.t.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.z: E = None
        self.x: D = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.z: D = None
        self.o: G = None
        self.s: D = None
        self.r: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.r: H = None
        self.s: A = None
        self.p: C = None
        self.v: H = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

e = A("e")
c = B("c")
a = C("a")
i = D("i")
k = E("k")
b = F("b")
d = G("d")
j = H("j")
m = D("m")

e.o = j
e.w = k
c.y = k
c.x = d
c.o = a
c.w = m
a.x = k
a.u = e
a.y = c
a.v = c
a.s = m
a.o = j
i.v = j
i.w = j
i.p = b
i.z = k
i.x = m
i.y = c
k.x = d
k.u = d
k.o = d
k.r = d
k.z = m
k.s = i
k.t = b
b.t = k
d.u = e
d.t = e
d.s = e
d.r = j
d.v = j
d.y = j
d.p = a
d.x = c
j.s = d
m.v = j
m.w = j
m.p = b
m.z = k
m.x = i
m.y = c
assert m.w.s.x.o.u.w.t.t.z.txt == "m"