// C++ program to find the longest palindrome by removing // or shuffling characters from the given string #include using namespace std; // Function to find the longest palindrome by removing // or shuffling characters from the given string // Driver code int main() { string str; cin>>str; int t; cin>>t; while(t--){ int a;cin>>a; int b;cin>>b; if((b-a)!=1) cout<<"2"<