def rotate_left(arr, count):
    '''
    In place left rotation:
    temp = arr[:count]
    arr = arr[count:]
    arr.extend(temp)
    '''

    return arr[count:] + arr[:count]


def main():
    n, d = map(int, input().split())
    arr = list(map(int, input().split()))

    print(f'Input array:  {arr}')
    print(f'Rotated array:  {rotate_left(arr, d)}')


if __name__ == '__main__':
    main()

df59b2d76095910e0c126ae204938ca2d0747f4e
<mask token>

<mask token>


def main():
    n, d = map(int, input().split())
    arr = list(map(int, input().split()))
    print(f'Input array:  {arr}')
    print(f'Rotated array:  {rotate_left(arr, d)}')


<mask token>

def rotate_left(arr, count):
    """
    In place left rotation:
    temp = arr[:count]
    arr = arr[count:]
    arr.extend(temp)
    """
    return arr[count:] + arr[:count]


def main():
    n, d = map(int, input().split())
    arr = list(map(int, input().split()))
    print(f'Input array:  {arr}')
    print(f'Rotated array:  {rotate_left(arr, d)}')


<mask token>

def rotate_left(arr, count):
    """
    In place left rotation:
    temp = arr[:count]
    arr = arr[count:]
    arr.extend(temp)
    """
    return arr[count:] + arr[:count]


def main():
    n, d = map(int, input().split())
    arr = list(map(int, input().split()))
    print(f'Input array:  {arr}')
    print(f'Rotated array:  {rotate_left(arr, d)}')


if __name__ == '__main__':
    main()

def rotate_left(arr, count):
    '''
    In place left rotation:
    temp = arr[:count]
    arr = arr[count:]
    arr.extend(temp)
    '''

    return arr[count:] + arr[:count]


def main():
    n, d = map(int, input().split())
    arr = list(map(int, input().split()))

    print(f'Input array:  {arr}')
    print(f'Rotated array:  {rotate_left(arr, d)}')


if __name__ == '__main__':
    main()
