Printing given matrix in spiral way