#include #include #include #include #include #include using namespace std; vector hist(const string& s) { cout << s << endl; map m; for(char c : s) { m[c]++; } vector counts; for( map::iterator it = m.begin(); it != m.end(); ++it ) { if(it->second != 0){ counts.push_back( it->second ); } } return counts; } const long MOD = 1000000007; unsigned long getPalindroms(const string& s) { auto h = hist(s); //find max odd int max_odd = 0; for(auto v : h){ if(v % 2 == 1 && v > max_odd) max_odd = v; } //count max odds int max_odd_cnt = 0; for(auto v : h){ if(v == max_odd) max_odd_cnt++; } //multiply divisible by even and max odd // do not consider largest odd unsigned long tot = 1; for(auto v : h) { if(v != max_odd && v != 1) { auto even = v & ~1; tot *= (even % MOD); tot %= MOD; // cout << tot; } } if(max_odd != 1) { auto even = (max_odd-1)%MOD; for(int i = 0; i < max_odd_cnt-1; i++) { tot *= even; tot %= MOD; } tot *= (max_odd%MOD); tot %= MOD; } return tot; } int main(){ string s; cin >> s; int q; cin >> q; while(q--){ int l, r; cin >> l >> r; cout << 2 << endl; } return 0; }