• + 0 comments

    python solution

    n, d = map(int,input().split(' '))
    arr = list(map(int,input().split(' ')))
    for i in range(n):
        print(arr[(d+i)%n],end=' ')