class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.p: B = None
        self.u: A = None
        self.v: H = None
        self.q: A = None
        self.r: F = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: D = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: C = None
        self.u: J = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: E = None
        self.z: F = None
        self.y: D = None
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: A = None
        self.p: B = None
        self.u: A = None
        self.v: H = None
        self.q: A = None
        self.r: F = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: D = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: C = None
        self.u: J = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: E = None
        self.z: F = None
        self.y: D = None
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

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