fork download
  1. l = list(tuple(map(int,input().split())))
  2. k = int(input())
  3. for i in range(k):
  4. l.append(l.pop(0))
  5. print(tuple(l))
  6.  
Success #stdin #stdout 0.1s 14096KB
stdin
1 2 3 4 5
2
stdout
(3, 4, 5, 1, 2)