#include using namespace std; /*void initialize(string s) { // This function is called once before all queries. } int answerQuery(int l, int r) { // Return the answer for this query modulo 1000000007. }*/ int main() { string s; cin >> s; //initialize(s); int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ int b[100]={0}; int l,count=0,count1=0; int r; cin >> l >> r; for(int i=l;i