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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.q: I = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.t: G = None
        self.p: F = None
        self.q: J = None
        self.y: J = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.y: C = None
        self.s: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.q: I = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.t: G = None
        self.p: F = None
        self.q: J = None
        self.y: J = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: E = None
        self.y: C = None
        self.s: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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