#include using namespace std; using ll =long long; #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i=a;i=b;i--) ll INF=2e18; void solve() { ll N;cin>>N; string S;cin>>S; for(ll i=0;i=5) { ll d=i-1; ll e=i-2; if(d<0) d+=N; if(e<0) e+=N; if(S[a]=='?'&&S[d]!='?'&&S[b]!='?') { if(S[d]!=S[b]&&S[d]==S[e]&&S[b]==S[c]) { cout<<"NO"<>t; for(ll i=0;i