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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.x: F = None
        self.w: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.x: C = None
        self.y: F = None
        self.t: J = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.x: F = None
        self.v: A = None
        self.z: G = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.x: F = None
        self.w: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: I = None
        self.x: C = None
        self.y: F = None
        self.t: J = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.x: F = None
        self.v: A = None
        self.z: G = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

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

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