Shift each row of the given rectangular matrix NxM cyclically to the right by the number of positions equal to the row number (numbering of rows and columns starts from 0). Display the transformed matrix.

Input
The first line contains two numbers N and M (\(0 < N,M <= 10\)). Next come N lines of M numbers in each - matrix elements (each element is no more than 100 modulo).

Imprint
Output the modified matrix. For each element in the output, allocate exactly 3 characters (familiar spaces).