For this Question: Newton is given a string of length N. Further his friend Alice gave him a challenge and gave Q queries to him.

Now Newton has to process each of the queries correctly. The queries are described as below. Each query consists of 2 integers:
 1) 1 A: In this type of query, Newton has to right shift the string 'A' times.
 2) 2 A: In this type of query, Newton has to tell Alice the Ath character of the string.

(One right shift of string "newton" would look like "nnewto")

Note: The string will change according to each query.The first line of the input would consist of 2 integers, N and Q
The next Q line represent Q queries. The ith of which contains 2 integers - Ti Ai

Constraints:
2 <= N <= 7x10^5
1 <= Q <= 7x10^5
1 <= Ai <= N
Ti = {1, 2}
S consists of lowercase English letters.For each query of type "2 A", print the answer in a single new line.Sample Input 1:
6 3
newton
2 2
1 1
2 2
 
Sample Output 1:
e
n, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {
        FastReader sc = new FastReader();
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        int rt = 0;
        while(k-->0){
            int t = sc.nextInt();
            int x = sc.nextInt();
            if(t==1){
                rt = (rt+x)%n;



            }
            else System.out.println(s.charAt((n+x-1-rt)%n));
        }
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;
        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() { return Integer.parseInt(next()); }
        long nextLong() { return Long.parseLong(next()); }
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
        String nextLine() {
            String str = "";
            try {
                if(st.hasMoreTokens()){
                    str = st.nextToken("\n");
                }
                else{
                    str = br.readLine();
                }
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?