import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
} import java.io.*; io.* java public class Main{
    public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
} Main public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    } main {
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    } Reader rd = new Reader(); rd new Reader() int[] a = rd.ii(); a rd.ii() rd.ii rd int N = a[0] N a[0] a 0 Q = a[1]; Q a[1] a 1 String S = rd.s(); S rd.s() rd.s rd int[] l = new int[Q] l new int[Q] Q r = new int[Q]; r new int[Q] Q for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        } int i = 0; int i = 0; i 0 i < Q i Q i++ i++ i {
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        } {
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        } a = rd.ii() a rd.ii() rd.ii rd l[i] = a[0] l[i] l i a[0] a 0 r[i] = a[1] r[i] r i a[1] a 1 char[] letter = S.toCharArray(); letter S.toCharArray() S.toCharArray S int[] ac = new int[N+1]; ac new int[N+1] N+1 N 1 ac[0] = 0 ac[0] ac 0 0 for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        } {
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        } ac[i] = ac[i-1] ac[i] ac i ac[i-1] ac i-1 i 1 if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++; letter[i-1] == 'A' && letter[i] == 'C' letter[i-1] == 'A' letter[i-1] letter i-1 i 1 'A' letter[i] == 'C' letter[i] letter i 'C' ac[i]++ ac[i] ac i for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        } int i = 0; int i = 0; i 0 i < Q i Q i++ i++ i {
            print(ac[r[i]-1] - ac[l[i]-1]);
        } {
            print(ac[r[i]-1] - ac[l[i]-1]);
        } print(ac[r[i]-1] - ac[l[i]-1]) print ac[r[i]-1] - ac[l[i]-1] ac[r[i]-1] ac r[i]-1 r[i] r i 1 ac[l[i]-1] ac l[i]-1 l[i] l i 1 String[] args args static void print(Object o){
        System.out.println(o.toString());
    } print {
        System.out.println(o.toString());
    } System.out.println(o.toString()) System.out.println System.out System System.out o.toString() o.toString o Object o o static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    } max {
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    } int max = ii[0]; max ii[0] ii 0 for(int i : ii) if(max < i) max = i; int i ii if(max < i) max = i; if(max < i) max = i; max < i max i max = i max i return max; max int[] ii ii static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    } min {
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    } int min = ii[0]; min ii[0] ii 0 for(int i : ii) if(i < min) min = i; int i ii if(i < min) min = i; if(i < min) min = i; i < min i min min = i min i return min; min int[] ii ii static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    } max {
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    } long max = ll[0]; max ll[0] ll 0 for(long l : ll) if(max < l) max = l; long l ll if(max < l) max = l; if(max < l) max = l; max < l max l max = l max l return max; max long[] ll ll static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    } min {
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    } long min = ll[0]; min ll[0] ll 0 for(long l : ll) if(l < min) min = l; long l ll if(l < min) min = l; if(l < min) min = l; l < min l min min = l min l return min; min long[] ll ll static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    } max {
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    } double max = dd[0]; max dd[0] dd 0 for(double d : dd) if(max < d) max = d; double d dd if(max < d) max = d; if(max < d) max = d; max < d max d max = d max d return max; max double[] dd dd static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    } min {
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    } double min = dd[0]; min dd[0] dd 0 for(double d : dd) if(d < min) min = d; double d dd if(d < min) min = d; if(d < min) min = d; d < min d min min = d min d return min; min double[] dd dd static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    } Reader Reader(){
            super(new InputStreamReader(System.in));
        } Reader {
            super(new InputStreamReader(System.in));
        } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) String s() throws IOException{
            return readLine();
        } s {
            return readLine();
        } return readLine(); readLine() readLine String[] ss() throws IOException{
            return readLine().split(" ");
        } ss {
            return readLine().split(" ");
        } return readLine().split(" "); readLine().split(" ") readLine().split readLine() readLine " " int i() throws IOException{
            return Integer.parseInt(readLine());
        } i {
            return Integer.parseInt(readLine());
        } return Integer.parseInt(readLine()); Integer.parseInt(readLine()) Integer.parseInt Integer readLine() readLine int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        } ii {
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        } String[] ss = ss(); ss ss() ss int size = ss.length; size ss.length ss ss.length int[] ii = new int[size]; ii new int[size] size for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]); int j = 0; int j = 0; j 0 j < size j size j++ j++ j ii[j] = Integer.parseInt(ss[j]); ii[j] = Integer.parseInt(ss[j]) ii[j] ii j Integer.parseInt(ss[j]) Integer.parseInt Integer ss[j] ss j return ii; ii int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        } ii {
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        } int[] ii = new int[N]; ii new int[N] N for(int j = 0; j < N; j++) ii[j] = i(); int j = 0; int j = 0; j 0 j < N j N j++ j++ j ii[j] = i(); ii[j] = i() ii[j] ii j i() i return ii; ii int N N long l() throws IOException{
            return Long.parseLong(readLine());
        } l {
            return Long.parseLong(readLine());
        } return Long.parseLong(readLine()); Long.parseLong(readLine()) Long.parseLong Long readLine() readLine long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        } ll {
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        } String[] ss = ss(); ss ss() ss int size = ss.length; size ss.length ss ss.length long[] ll = new long[size]; ll new long[size] size for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]); int j = 0; int j = 0; j 0 j < size j size j++ j++ j ll[j] = Long.parseLong(ss[j]); ll[j] = Long.parseLong(ss[j]) ll[j] ll j Long.parseLong(ss[j]) Long.parseLong Long ss[j] ss j return ll; ll long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        } ll {
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        } long[] ll = new long[N]; ll new long[N] N for(int j = 0; j < N; j++) ll[j] = i(); int j = 0; int j = 0; j 0 j < N j N j++ j++ j ll[j] = i(); ll[j] = i() ll[j] ll j i() i return ll; ll int N N BufferedReader public class Main{
    public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
} Main
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader rd = new Reader();        
        int[] a = rd.ii();
      	int N = a[0],
      		Q = a[1];
      	String S = rd.s();
      	int[] l = new int[Q],
      	      r = new int[Q];
      	for(int i = 0; i < Q; i++){
        	a = rd.ii();
          	l[i] = a[0];
          	r[i] = a[1];
        }
      	char[] letter = S.toCharArray();
        int[] ac = new int[N+1];
        ac[0] = 0;
        for(int i = 1; i < N; i++){
            ac[i] = ac[i-1];
            if(letter[i-1] == 'A' && letter[i] == 'C') ac[i]++;
        }
      	for(int i = 0; i < Q; i++){
            print(ac[r[i]-1] - ac[l[i]-1]);
        }
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
}