/*
 *  Add any license header using tools << templates << licenses << default license
 */

package Warmup;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author mukul goyal
 */

public class CircularArrayRotation {
    public static void main(String[] args) throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s[]=br.readLine().split(" ");
        int n=Integer.parseInt(s[0]);
        int k=Integer.parseInt(s[1]);
        int q=Integer.parseInt(s[2]);
        k=k%n;
        int a[]=new int[n];
        String s1[]=br.readLine().split(" ");
        for(int i=0;i<n;i++){
            a[(i+k)%n]=Integer.parseInt(s1[i]);
        }
        while(q-->0){
            System.out.println(a[Integer.parseInt(br.readLine())]);
        }
    }
}

@@ -1,95 +1,4 @@
-/*%0A *  Add any license header using tools %3C%3C templates %3C%3C licenses %3C%3C default license%0A */%0A%0A
 pack
@@ -106,17 +106,16 @@
 der;%0A%0A/*
-*
 %0A * @aut
@@ -122,19 +122,24 @@
 hor 
-mukul 
+-- rajat
 goyal
+715
 %0A */

Update CircularArrayRotation.java