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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: I = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.u: H = None
        self.s: F = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: I = None
        self.y: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.u: H = None
        self.s: F = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

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

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