The input comes as array of number elements:
The first element represents the number k
All other elements are from the array that needs to be processed.
[2, 7, 8, 9]
[3, 6, 7, 8, 9]
6 7 8
7 8 9
The output is printed on the console on two lines:
On the first line print the first k elements, separated by space.
On the second line print the last k elements, separated by space.