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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: C = None
        self.z: D = None
        self.s: I = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: J = None
        self.u: H = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: I = None
        self.s: J = None
        self.x: J = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.p: E = None
        self.r: A = None
        self.x: F = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: C = None
        self.z: D = None
        self.s: I = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: J = None
        self.u: H = None
        self.o: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: I = None
        self.s: J = None
        self.x: J = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.p: E = None
        self.r: A = None
        self.x: F = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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