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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: H = None
        self.y: D = None
        self.q: H = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: E = None
        self.x: G = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: C = None
        self.t: A = None
        self.x: C = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.y: F = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: H = None
        self.y: D = None
        self.q: H = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: E = None
        self.x: G = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: C = None
        self.t: A = None
        self.x: C = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: C = None
        self.u: F = None
        self.y: F = None
        self.p: F = None
        self.t: E = None
        self.txt = txt

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

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