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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: G = None
        self.v: G = None
        self.z: G = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: G = None
        self.v: G = None
        self.z: G = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.q: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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