Given a two-dimensional array N*M (\(0<N,M<=20\)).
Array element values are entered from the keyboard
Output in the first line all the corner elements of the array, starting from the upper left corner and moving clockwise.

Input
The first line specifies the size of the array. N - number of rows, M - number of columns (\(0<N,M<=20\) )
Next come N lines of M numbers in each line - elements of a two-dimensional array (each element modulo no more than 50)

Imprint
Output, one space apart, all the corner elements of the array, starting from the upper left corner and moving clockwise.