12422 - lazy_circulant matrix   

Description

Given a vector of dimension 5, use it to create an 5-by-5 circulant matrix. An example of circulant matrix:

1 5 4 3 2
2 1 5 4 3
3 2 1 5 4
4 3 2 1 5
5 4 3 2 1

 

Input

5 integers.

Output

The 5-by-5 circulant matrix. Every element is followed by space and don't forget to change line in the end each row even in the last.

Sample Input  Download

Sample Output  Download

Tags




Discuss