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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: E = None
        self.w: I = None
        self.z: A = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: B = None
        self.o: G = None
        self.y: J = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: B = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: E = None
        self.w: I = None
        self.z: A = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: B = None
        self.o: G = None
        self.y: J = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: B = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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