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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.o: E = None
        self.x: G = None
        self.z: B = None
        self.w: E = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: B = None
        self.u: E = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.o: E = None
        self.x: G = None
        self.z: B = None
        self.w: E = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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