class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: H = None
        self.p: D = None
        self.u: H = None
        self.o: B = None
        self.w: H = None
        self.v: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: C = None
        self.y: B = None
        self.u: B = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: H = None
        self.p: D = None
        self.u: H = None
        self.o: B = None
        self.w: H = None
        self.v: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: C = None
        self.y: B = None
        self.u: B = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

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

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

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