class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.r: I = None
        self.w: F = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: A = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.p: H = None
        self.r: F = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.x: B = None
        self.u: E = None
        self.z: I = None
        self.s: B = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.x: F = None
        self.o: F = None
        self.s: A = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.q: A = None
        self.y: D = None
        self.r: I = None
        self.z: I = None
        self.v: I = None
        self.w: I = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: B = None
        self.y: A = None
        self.u: C = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: A = None
        self.q: B = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.p: H = None
        self.r: F = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.x: B = None
        self.u: E = None
        self.z: I = None
        self.s: B = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.x: F = None
        self.o: F = None
        self.s: A = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.q: A = None
        self.y: D = None
        self.r: I = None
        self.z: I = None
        self.v: I = None
        self.w: I = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: B = None
        self.y: A = None
        self.u: C = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

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

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