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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.o: E = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.v: J = None
        self.r: E = None
        self.o: B = None
        self.q: I = None
        self.x: I = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.v: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.x: A = None
        self.v: F = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: D = None
        self.o: E = None
        self.s: E = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.v: J = None
        self.r: E = None
        self.o: B = None
        self.q: I = None
        self.x: I = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: G = None
        self.v: G = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.x: A = None
        self.v: F = None
        self.u: G = None
        self.z: I = None
        self.txt = txt

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

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