#!/bin/python3 import math import os import random import re import sys # # Complete the 'rotLeft' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts following parameters: # 1. INTEGER_ARRAY a # 2. INTEGER d # def rotLeft ( a , d ): # Write your code here temp = [] i = 0 while i < d : temp . append ( a [ i ]) i = i + 1 i = 0 while d < len ( a ): a [ i ] = a [ d ] i = i + 1 d = d + 1 a [:] = a [: i ] + temp return a if __ name__ == '__main__' : fptr = open ( os . environ [ 'OUTPUT_PATH' ], 'w' ) first_multiple_input = input () . rstrip () . split () n = int ( first_multiple_input [ 0 ]) d = int ( first_multiple_input [ 1 ]) a = list ( map ( int , input () . rstrip () . split ())) result = rotLeft ( a , d ) fptr . write ( ' ' . join