class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.x: A = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.w: H = None
        self.v: B = None
        self.x: H = None
        self.p: A = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.t: F = None
        self.w: C = None
        self.z: A = None
        self.v: F = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.x: A = None
        self.p: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.w: H = None
        self.v: B = None
        self.x: H = None
        self.p: A = None
        self.r: G = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: G = None
        self.t: F = None
        self.w: C = None
        self.z: A = None
        self.v: F = None
        self.x: G = None
        self.txt = txt

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

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