#include <bits/stdc++.h>
using namespace std;
string solve(string s){
    cout << "inside solve";
    for(int i=0; i<s.length(); i++){
        int occur=0;
        while(i+1 < s.length()){
            if(s[i] == s[i+1])
                occur++;
        }
        if(occur%2!=0 && occur%3!=0 && occur%5!=0)
            return "no";
    }
    cout << "inside solve";
    return "yes";
}
int main(){
    ios_base::sync_with_stdio(0);
    //cin.tie(0); cout.tie(0);
    int tc;
    cin >> tc;
    //cout << tc;
    while(tc--){
        string s;
        cin >> s;
        //cout << "Inside main's while";
        cout << solve(s);
    }
    return 0;
}
In my main function after I'm inputting the string nothing is happening. Is there some problem in using cin >> s. Also when I'm uncommenting the line cin.tie(0); cout.tie(0); It is not going inside while loop too. So what is happening?
 
    