class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.q: G = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.q: G = None
        self.x: F = None
        self.o: E = None
        self.txt = txt

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

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

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