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.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test {
	static class BIT {
		private int[] array;
		private int total;

		public BIT(int[] ar) {
			this.total = ar.length;
			int i = 1;
			while (i < this.total) {
				i = i * 2;
			}
			array = new int[i];
		}

		public BIT(int N) {
			this.total = N;
			int i = 1;
			while (i < this.total) {
				i = i * 2;
			}
			array = new int[i];
		}

		public void update(int index, int value) {
			index = index;
			while (index < total) {
				array[index] += value;
				index += index & (-index);
			}
		}

		public long sum(int index) {
			int sum = 0;
			index = index;
			while (index > 0) {
				sum += array[index];
				index -= index & (-index);
			}
			return sum;
		}

	}

	// 1000 3 4
	// fofofofofofofof
	// fof

	// JAVA program for implementation of KMP pattern
	// searching algorithm

	static class KMP_String_Matching {
		List<Integer> list = new ArrayList<Integer>();

		void KMPSearch(String pat, String txt) {
			int M = pat.length();
			int N = txt.length();

			// create lps[] that will hold the longest
			// prefix suffix values for pattern
			int lps[] = new int[M];
			int j = 0; // index for pat[]

			// Preprocess the pattern (calculate lps[]
			// array)
			computeLPSArray(pat, M, lps);

			int i = 0; // index for txt[]
			while (i < N) {
				if (pat.charAt(j) == txt.charAt(i)) {
					j++;
					i++;
				}
				if (j == M) {
					list.add((i - j));
					// System.out
					// .println("Found pattern " + "at index " + (i - j));
					j = lps[j - 1];
				}

				// mismatch after j matches
				else if (i < N && pat.charAt(j) != txt.charAt(i)) {
					// Do not match lps[0..lps[j-1]] characters,
					// they will match anyway
					if (j != 0)
						j = lps[j - 1];
					else
						i = i + 1;
				}
			}
		}

		void computeLPSArray(String pat, int M, int lps[]) {
			// length of the previous longest prefix suffix
			int len = 0;
			int i = 1;
			lps[0] = 0; // lps[0] is always 0

			// the loop calculates lps[i] for i = 1 to M-1
			while (i < M) {
				if (pat.charAt(i) == pat.charAt(len)) {
					len++;
					lps[i] = len;
					i++;
				} else // (pat[i] != pat[len])
				{
					// This is tricky. Consider the example.
					// AAACAAAA and i = 7. The idea is similar
					// to search step.
					if (len != 0) {
						len = lps[len - 1];

						// Also, note that we do not increment
						// i here
					} else // if (len == 0)
					{
						lps[i] = len;
						i++;
					}
				}
			}
		}

	}

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String readLine = br.readLine();
		Scanner sc = new Scanner(readLine);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int q = sc.nextInt();
		String s = br.readLine();
		String t = br.readLine();

		// Check all occurrences
		BIT tree1 = new BIT(n + 2);

		KMP_String_Matching kmp_String_Matching = new KMP_String_Matching();
		kmp_String_Matching.KMPSearch(t, s);
		int patternLength = t.length();
		List<Integer> list = kmp_String_Matching.list;
		for (int i : list) {
			tree1.update(i + 1, 1);
		}

		while (q-- > 0) {
			String[] split = br.readLine().split(" ");
			int start = Integer.parseInt(split[0].trim());
			int end = Integer.parseInt(split[1].trim()) - patternLength + 1;
			if (end >= start) {
				long temp1 = tree1.sum(end);
				long temp2 = tree1.sum(start - 1);
				long answer = temp1 - temp2;
				System.out.println(answer);
			} else {
				System.out.println(0);
			}
		}
	}

}
