class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: I = None
        self.s: H = None
        self.y: B = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: J = None
        self.u: G = None
        self.o: A = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: A = None
        self.v: D = None
        self.x: B = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: A = None
        self.q: A = None
        self.o: A = None
        self.z: A = None
        self.y: B = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.p: F = None
        self.q: F = None
        self.s: F = None
        self.o: J = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: A = None
        self.r: I = None
        self.s: G = None
        self.w: A = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: J = None
        self.u: G = None
        self.o: A = None
        self.x: D = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: A = None
        self.v: D = None
        self.x: B = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: A = None
        self.q: A = None
        self.o: A = None
        self.z: A = None
        self.y: B = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.p: F = None
        self.q: F = None
        self.s: F = None
        self.o: J = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: A = None
        self.r: I = None
        self.s: G = None
        self.w: A = None
        self.x: H = None
        self.txt = txt

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

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