class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: G = None
        self.p: I = None
        self.w: J = None
        self.s: I = None
        self.t: J = None
        self.o: E = None
        self.x: G = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.w: I = None
        self.r: J = None
        self.z: I = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: G = None
        self.p: I = None
        self.w: J = None
        self.s: I = None
        self.t: J = None
        self.o: E = None
        self.x: G = None
        self.v: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.w: I = None
        self.r: J = None
        self.z: I = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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