class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.v: H = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.v: H = None
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

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

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