class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: C = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: B = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: B = None
        self.v: C = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.r: H = None
        self.txt = txt

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

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