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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.s: C = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.t: G = None
        self.s: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.w: G = None
        self.y: H = None
        self.q: H = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.s: C = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.t: G = None
        self.s: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: B = None
        self.w: G = None
        self.y: H = None
        self.q: H = None
        self.x: E = None
        self.txt = txt

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

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