Print a matrix spirally

See file comment for question definition