A *simple magic cube* is an *n*×*n*×*n* array of distinct positive integers (*n* > 1)
such that the sums of the entries in any row parallel to an edge of the array (there are 3*n*^{2} of these rows)
and the sums along the four space diagonals are all equal. A *perfect magic cube* is a simple magic cube such that the
sums along the diagonals parallel to a face diagonal (there are 6*n* of these diagonals) are also equal to the other sums.

- Find a simple magic cube whose sum is 2009.
- Find a perfect magic cube whose sum is 2009.

Try to find cubes whose largest entry is as small as possible.