@@ -0,0 +1,987 @@
+//https://www.hackerrank.com/challenges/sherlock-and-watson%0Aimport java.io.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        %0A        //INPUT%0A        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A        String input%5B%5D = br.readLine().split(%22 %22);%0A        final int N = Integer.parseInt(input%5B0%5D);%0A        final int K = Integer.parseInt(input%5B1%5D);%0A        final short Q = Short.parseShort(input%5B2%5D);%0A        final int%5B%5D A = new int%5BN%5D;%0A        input = br.readLine().split(%22 %22);%0A        for(int i = 0; i %3C N; ++i)%7B%0A            A%5Bi%5D = Integer.parseInt(input%5Bi%5D);%0A        %7D%0A        %0A        int offset = N - K%25N;%0A        StringBuffer sb = new StringBuffer();%0A        for(short q = 0; q %3C Q; ++q)%7B%0A            final int X = Integer.parseInt(br.readLine());%0A            %0A            //SOLVE%0A            sb.append(A%5B(X + offset)%25N%5D + %22%5Cn%22);%0A        %7D%0A        %0A        //OUTPUT%0A        System.out.print(sb);%0A    %7D%0A%7D%0A

Create sherlock-and-watson.java