class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.u: E = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.r: C = None
        self.q: F = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.u: F = None
        self.v: D = None
        self.w: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: H = None
        self.p: J = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.t: H = None
        self.y: A = None
        self.q: J = None
        self.x: J = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.t: I = None
        self.w: E = None
        self.r: E = None
        self.v: B = None
        self.q: E = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: A = None
        self.u: E = None
        self.z: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: B = None
        self.r: C = None
        self.q: F = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: C = None
        self.u: F = None
        self.v: D = None
        self.w: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: H = None
        self.p: J = None
        self.z: D = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: E = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.t: H = None
        self.y: A = None
        self.q: J = None
        self.x: J = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.t: I = None
        self.w: E = None
        self.r: E = None
        self.v: B = None
        self.q: E = None
        self.z: A = None
        self.txt = txt

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

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