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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.t: B = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

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

g = A("g")
k = B("k")
n = C("n")
e = D("e")
l = E("l")
b = F("b")
i = G("i")
m = H("m")
d = I("d")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.q: B = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: H = None
        self.t: B = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

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

g = A("g")
k = B("k")
n = C("n")
e = D("e")
l = E("l")
b = F("b")
i = G("i")
m = H("m")
d = I("d")
h = J("h")

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