class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: C = None
        self.v: B = None
        self.z: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.z: B = None
        self.p: A = None
        self.q: H = None
        self.r: B = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: G = None
        self.o: D = None
        self.v: C = None
        self.t: A = None
        self.p: D = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.p: C = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.z: B = None
        self.p: A = None
        self.q: H = None
        self.r: B = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: G = None
        self.o: D = None
        self.v: C = None
        self.t: A = None
        self.p: D = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: F = None
        self.p: C = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

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

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

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