Spiral Matrix Hackerrank Solution, Write a program that reads an MxN matrix A and prints its elements in spiral order.