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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: D = None
        self.p: I = None
        self.y: E = None
        self.t: E = None
        self.r: G = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.z: I = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.z: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: D = None
        self.p: I = None
        self.y: E = None
        self.t: E = None
        self.r: G = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.z: I = None
        self.s: G = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.z: A = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

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

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

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