• + 0 comments

    python 3

    size ,shift , queries = map(int , input().split()) 
    l = list(map(int , input().split()))
    stind =size - shift%size 
    while(queries>0):
        n =int(input())
        print(l[(stind +n)%size])
        queries -= 1