You are given two strings s and t, both consisting only of lowercase Latin letters.

The substring s[l..r] is the string which is obtained by taking characters s_l, s_{l + 1}, ..., s_r without changing the order.

Each of the occurrences of string a in a string b is a position i (1 ≤ i ≤ |b| - |a| + 1) such that b[i..i + |a| - 1] = a (|a| is the length of string a).

You are asked q queries: for the i-th query you are required to calculate the number of occurrences of string t in a substring s[l_i..r_i].

Input

The first line contains three integer numbers n, m and q (1 ≤ n, m ≤ 10^3, 1 ≤ q ≤ 10^5) — the length of string s, the length of string t and the number of queries, respectively.

The second line is a string s (|s| = n), consisting only of lowercase Latin letters.

The third line is a string t (|t| = m), consisting only of lowercase Latin letters.

Each of the next q lines contains two integer numbers l_i and r_i (1 ≤ l_i ≤ r_i ≤ n) — the arguments for the i-th query.

Output

Print q lines — the i-th line should contain the answer to the i-th query, that is the number of occurrences of string t in a substring s[l_i..r_i].

Examples

Input

10 3 4
codeforces
for
1 3
3 10
5 6
5 7


Output

0
1
0
1


Input

15 2 3
abacabadabacaba
ba
1 15
3 4
2 14


Output

4
0
3


Input

3 5 2
aaa
baaab
1 3
1 1


Output

0
0

Note

In the first example the queries are substrings: "cod", "deforces", "fo" and "for", respectively.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class B {
    public static void main(String args[])throws Exception{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        StringBuilder sb=new StringBuilder();
        int n=Integer.parseInt(st.nextToken());
        int m=Integer.parseInt(st.nextToken());
        int q=Integer.parseInt(st.nextToken());
        String str=br.readLine();

        String pattern=br.readLine();
        int reset[]=new int[pattern.length()];
        int j=-1;
        int i=0;
        reset[0]=-1;
        while(i<reset.length){

            while(j>=0 && pattern.charAt(i)!=pattern.charAt(j)){
                j=reset[j];
            }

            j++;
            i++;
            if(i<reset.length)
                reset[i]=j;


        }
        int Que[][]=new int[q][2];
        for( i=0;i<q;i++){
            st=new StringTokenizer(br.readLine());
            Que[i][0]=Integer.parseInt(st.nextToken());
            Que[i][1]=Integer.parseInt(st.nextToken());
        }

        /*for(int k=0;k<q;k++){
            int count=0;
            if((Que[k][1]-Que[k][0]+1)<pattern.length()){
                sb.append(count+"\n");
                //System.out.println(77);
            }
            else{
                i=Que[k][0]-1;
                j=0;
                int ini=i;
                int h=Que[k][1];
                while(i<h){
                    int len=0;
                    while(i<h && j<pattern.length() && str.charAt(i)==pattern.charAt(j)){
                        i++;
                        j++;
                        len++;
                    }
                    if(len==pattern.length()){
                        if(reset[j-1]>ini)
                            i=i-1-reset[j-1];
                        else
                            i++;
                        j=0;
                        count++;
                    }
                    else
                    {
                        if(reset[j]>ini)
                            i=i-reset[j];
                        else
                            i++;
                        j=0;
                    }
                }
                sb.append(count+"\n");
            }

        }*/
        ArrayList<Integer> lsts=new ArrayList<>();
        ArrayList<Integer> lste=new ArrayList<>();

        i=0;
        j=0;

        while(i<str.length()){
            int len=0;
            int ini=i;
            while(i<str.length() && j<pattern.length() && str.charAt(i)==pattern.charAt(j)){
                i++;
                j++;
                len++;
            }
            if(len==pattern.length()){
                lsts.add(ini);
                lste.add(ini+pattern.length()-1);
                if(reset[j-1]>0)
                    i=i-1-reset[j-1];
                else if(len!=1 && pattern.length()!=1)
                    i--;
                j=0;

            }
            else
            {
                if(reset[j]>0 && len>0)
                    i=i-reset[j];
                else if(len==0)
                    i++;
                j=0;
            }
        }
        //System.out.println(lsts);
        // System.out.println(lste);
        //System.out.println(Collections.binarySearch(lste,15));
        for(int k=0;k<q;k++){
            int a=Que[k][0]-1;
            int b=Que[k][1]-1;
            int ind= Collections.binarySearch(lsts,a);
            if(ind<0){
                ind=Math.abs(ind)-1;
            }
            int count=0;
            for(int h=0;h<lsts.size();h++){
                if(lsts.get(h)>=a && lste.get(h)<=b)
                    count++;

            }
            sb.append(count+"\n");
        }
        System.out.println(sb);
    }
}
// This algorithm is partially O(N) where we are everytime Computing the the number of occurances So
// the complexity of algorithm will be O( q*N )
// ie More t the NUmber