Magic_matrix (Problem 33)