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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: D = None
        self.v: A = None
        self.z: C = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: H = None
        self.z: A = None
        self.r: C = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.o: J = None
        self.q: D = None
        self.y: J = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: D = None
        self.v: A = None
        self.z: C = None
        self.q: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: H = None
        self.z: A = None
        self.r: C = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: J = None
        self.o: J = None
        self.q: D = None
        self.y: J = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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