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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.x: B = None
        self.s: H = None
        self.w: I = None
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

g.o = k
g.u = l
g.y = l
g.t = h
g.r = b
g.z = m
g.x = m
f.u = g
f.p = g
f.s = i
f.t = i
f.r = i
f.v = i
f.y = b
f.x = l
l.v = h
l.o = a
n.x = i
n.q = h
h.r = m
h.v = m
m.y = n
m.o = k
m.t = a
i.p = h
i.o = n
i.w = l
a.o = f
a.v = g
a.s = n
a.x = h
b.x = n
b.w = g
k.v = l
k.y = n
k.x = f
k.s = a
k.w = b
k.r = h
k.p = m
assert a.s.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: C = None
        self.y: C = None
        self.t: E = None
        self.r: I = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.x: B = None
        self.s: H = None
        self.w: I = None
        self.r: E = None
        self.p: F = None
        self.txt = txt

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

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