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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.w: I = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: G = None
        self.x: E = None
        self.s: H = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.t: G = None
        self.u: F = None
        self.z: B = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: F = None
        self.w: I = None
        self.y: J = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: G = None
        self.x: E = None
        self.s: H = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.t: G = None
        self.u: F = None
        self.z: B = None
        self.w: A = None
        self.o: B = None
        self.txt = txt

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

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