~/algor $ cat problems/array/cyclic-shift-left-by-1
Cyclic shift left by 1
Easy
1000 ms
128 MB
31%
A positive integer and an array of integers are given. Cyclically shift the array elements by position to the left (the first element moves to the last place) and print the resulting array.
Input
The first line contains a positive integer . The second line contains integers separated by spaces.
Output
One line with integers separated by spaces.
Note
Examples
Input #1
5 10 20 30 40 50
Output #1
20 30 40 50 10
Input #2
3 1 2 3
Output #2
2 3 1