You are given a string S of length N and there are Q queries. In each query, you are provided with 2 integers L and R. You need to find the number of distinct characters present in the range L to R.
Input :
Output :
For each query , output number of distinct characters in newline .
Constraints :
In the First Query , there are 5 distinct characters from substring 'nikunj ' .
In the Second Query , 4 there are 4 distinct characters from substring 'niku'.