class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: D = None
        self.s: D = None
        self.u: G = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.z: A = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.r: H = None
        self.o: H = None
        self.x: H = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
h = C("h")
c = D("c")
k = E("k")
b = F("b")
f = G("f")
a = H("a")

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.z: A = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.r: H = None
        self.o: H = None
        self.x: H = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
h = C("h")
c = D("c")
k = E("k")
b = F("b")
f = G("f")
a = H("a")

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