Consecutive #11718

Consecutive

1 second
128 megabytes
Easy

You are given a string s = s_1 s_2 ... s_n of length consisting of lowercase English letters.

Additionally, you are given queries about the string . For i = 1, 2, ..., q, the -th query is represented by two integers l_i, r_i and asks the following:

Print the answer for each of the queries.

Input

The first line contains two integers and q~(1 \le n, q \le 3 \cdot 10^5).

The second line is a string of length consisting of lowercase English letters.

Each of the next lines contains a query (l_i, r_i), 1 \le l_i, r_i \le n, 1 \le i \le q.

Output

Print lines. For i = 1, 2, ..., q, the -th line should contain the answer to the -th query.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading