Rotate the array clockwise#701

Rotate the array clockwise

1 second
64 megabytes
Easy (≈1000)

Given a square two-dimensional array of size n x n, your task is to return its elements in a clockwise spiral order.

Input

The first line of the input contains a single integer n, representing the size of the array.

The following n lines each contain n integers, which are the elements of the array.

Output

Print the elements of the array in a clockwise spiral order.

Examples

Example 1

Loading
Loading