There are total $N$ cars in a sequence with $ith$ car being assigned with an alphabet equivalent to the $ith$ alphabet of string $S$ . Chef has been assigned a task to calculate the total number of cars with alphabet having a unique even value in the given range X to Y (both inclusive)
. The value of an alphabet is simply its position in alphabetical order e.g.: a=1, b=2, c=3…
The chef will be given $Q$
such tasks having varying values of $X$ and $Y$
Note: string $S$ contains only lowercase alphabets

-----Input-----
First line of input contains a string $S$ of length $N$.
Second line contains an integer denoting no. of queries $Q$.
Next q lines contain two integers denoting values of $X$ and $Y$.

-----Output-----
For each query print a single integer denoting total number of cars with alphabet having a unique even value in the given range $X$ to $Y$.

-----Constraints-----
- $1 \leq n \leq 10^5$
- $1 \leq q \leq 10^5$

-----Example Input-----
bbccdd
5
1 2
3 4
5 6
1 6
2 5

-----Example Output-----
1
0
1
2
2

-----Explanation:-----
Example case 1: 
Query 1: range 1 to 2 contains the substring $"bb"$ where each character has a value of 2. Since we will only be considering unique even values, the output will be 1

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\r\nfrom functools import lru_cache, cmp_to_key\r\nfrom heapq import merge, heapify, heappop, heappush\r\nfrom math import *\r\nfrom collections import defaultdict as dd, deque, Counter as C\r\nfrom itertools import combinations as comb, permutations as perm\r\nfrom bisect import bisect_left as bl, bisect_right as br, bisect\r\nfrom time import perf_counter\r\nfrom fractions import Fraction\r\nimport copy\r\nimport time\r\nstarttime = time.time()\r\nmod = int(pow(10, 9) + 7)\r\nmod2 = 998244353\r\n# from sys import stdin\r\n# input = stdin.readline\r\ndef data(): return sys.stdin.readline().strip()\r\ndef out(*var, end="\\n"): sys.stdout.write(\' \'.join(map(str, var))+end)\r\ndef L(): return list(sp())\r\ndef sl(): return list(ssp())\r\ndef sp(): return map(int, data().split())\r\ndef ssp(): return map(str, data().split())\r\ndef l1d(n, val=0): return [val for i in range(n)]\r\ndef l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]\r\ntry:\r\n    # sys.setrecursionlimit(int(pow(10,7)))\r\n    sys.stdin = open("input.txt", "r")\r\n    # sys.stdout = open("../output.txt", "w")\r\nexcept:\r\n    pass\r\ndef pmat(A):\r\n    for ele in A:\r\n        print(*ele,end="\\n")\r\ndef seive():\r\n    prime=[1 for i in range(10**6+1)]\r\n    prime[0]=0\r\n    prime[1]=0\r\n    for i in range(10**6+1):\r\n        if(prime[i]):\r\n            for j in range(2*i,10**6+1,i):\r\n                prime[j]=0\r\n    return prime\r\n\r\nimport sys\r\n\r\ns = list(sys.stdin.readline().strip())\r\nn = len(s)\r\nBIT = [[0]*(n+1) for i in range(26)]\r\n\r\ndef update(i, idx, val):\r\n    idx += 1\r\n    while idx <= n:\r\n        BIT[i][idx] += val\r\n        idx += (-idx & idx)\r\n\r\ndef read(i, idx):\r\n    ret = 0\r\n    while idx > 0:\r\n        ret += BIT[i][idx]\r\n        idx -= (-idx & idx)\r\n    return ret \r\n\r\nfor i in range(n):\r\n    update(ord(s[i])-97, i, 1)\r\n\r\nq = int(sys.stdin.readline())\r\n\r\nfor _ in range(q):\r\n    a, b = sys.stdin.readline().split()\r\n    t=2\r\n    if t=="1":\r\n        idx = int(a) - 1\r\n        bit_idx = ord(s[idx])-97\r\n        update(bit_idx, idx, -1)\r\n        s[idx] = b\r\n        bit_idx = ord(b)-97\r\n        update(bit_idx, idx, 1)\r\n    else:\r\n        ans = 0\r\n        l, r = int(a), int(b)\r\n        for i in range(1,26,2):\r\n            ans += 1 if (read(i, r) - read(i, l-1)) > 0 else 0\r\n        print(ans)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nendtime = time.time()\r\n# print(f"Runtime of the program is {endtime - starttime}")\r\n\r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 185410