class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: G = None
        self.q: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.t: H = None
        self.p: J = None
        self.q: E = None
        self.y: D = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.w: B = None
        self.p: J = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.y: J = None
        self.t: F = None
        self.o: J = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.y: D = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.t: H = None
        self.p: J = None
        self.q: E = None
        self.y: D = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.w: B = None
        self.p: J = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.y: J = None
        self.t: F = None
        self.o: J = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.y: D = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

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

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