class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.t: B = None
        self.u: A = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.t: B = None
        self.u: A = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

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

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