8           7           2
4           6           5
6           4           8
7           8           4
5           5           6
2           2           7


## Sample Input

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


## Sample Output

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