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.*;
import java.util.*;
public class Main
{

	static int KMPSearch(String pat, String txt)
    {
        int M = pat.length();
        int N = txt.length();
		int count = 0;
        int lps[] = new int[M];
        int j = 0;
        computeLPSArray(pat,M,lps);
        int i = 0;
        while (i < N)
        {
            if (pat.charAt(j) == txt.charAt(i))
            {
                j++;
                i++;
            }
            if (j == M)
            {
				count++;
				// System.out.println("Found pattern " + "at index "  + (i-j));
                j = lps[j-1];
            }
            else if (i < N && pat.charAt(j) != txt.charAt(i))
            {
                if (j != 0)
                    j = lps[j-1];
                else
                    i = i+1;
            }
		}
		return count;
    }
 
    static void computeLPSArray(String pat, int M, int lps[])
    {
        int len = 0;
        int i = 1;
        lps[0] = 0; 
        while (i < M)
        {
            if (pat.charAt(i) == pat.charAt(len))
            {
                len++;
                lps[i] = len;
                i++;
            }
            else 
            {
                if (len != 0)
                {
                    len = lps[len-1];
                }
                else 
                {
                    lps[i] = len;
                    i++;
                }
            }
        }
    }

	public static void main(String[] args) throws IOException
	{
		Reader in=new Reader();
		// int t = ni();
		int t = 1;
		while(t-->0) {
			int n = ni();
			int m = ni();
			int q = ni();
			String s = ns();
			String st = ns();
			while(q-->0) {
				int l = ni();
				int r = ni();
				int count = 0;
				// for(int i=l-1;i<=r-m;i++) {
					// if(s.substring(i,i+m).equals(st)){
					// 	new KMP_String_Matching().KMPSearch(pat,txt);
					// 	count++;
					// }
					// System.out.println(s.substring(l-1,r)+" "+st);
					count = KMPSearch(st,s.substring(l-1,r));
				// }
				ans.append(count + "\n");
			}
		}
		System.out.println(ans);
	}

	static final int mod=1000000007;
    static StringBuilder ans=new StringBuilder();
	static Reader in=new Reader();
	static final double eps=1e-9;

	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}

	//////output functions////////////////
	static void pr(Object a){ans.append(a+"\n");}
	static void pr(){ans.append("\n");}
	static void p(Object a){ans.append(a);}
	static void pra(int[]a){for(int i:a)ans.append(i+" ");ans.append("\n");}
	static void pra(long[]a){for(long i:a)ans.append(i+" ");ans.append("\n");}
	static void pra(String[]a){for(String i:a)ans.append(i+" ");ans.append("\n");}
	static void pra(double[]a){for(double i:a)ans.append(i+" ");ans.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.print(ans);ans=new StringBuilder();}

	static void exit(){System.out.print(ans);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}	
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}	
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}	
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}	
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}

	static class Reader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        String next() {while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {tokenizer = new StringTokenizer(reader.readLine());}
				catch (IOException e) {throw new RuntimeException(e);}}
            return tokenizer.nextToken();}
        int nextInt() {return Integer.parseInt(next());}
        long nextLong() {return Long.parseLong(next());}
        double nextDouble() {return Double.parseDouble(next());}
    }

}
