class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: I = None
        self.p: C = None
        self.u: H = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: G = None
        self.x: I = None
        self.z: G = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.v: A = None
        self.u: A = None
        self.q: C = None
        self.t: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: G = None
        self.x: I = None
        self.z: G = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: A = None
        self.v: A = None
        self.u: A = None
        self.q: C = None
        self.t: B = None
        self.z: F = None
        self.txt = txt

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

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