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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.r: H = None
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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