120 Degrees

Rotate that triangle.

Input

   1
  9 2
 8   3
7 6 5 4

Output

   4
  3 5
 2   6
1 9 8 7