fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. //ios_base::sync_with_stdio(false);
  6. int test;
  7. cin>>test;
  8. cin.ignore();
  9. while(test--){
  10. int i,j,k=0,n,m;
  11. string str;
  12. getline(cin,str);
  13. //cout<<str<<endl;
  14. //cin.ignore();
  15. j=str.size()-1;
  16. for(i=0;i<str.size()-2;i++){
  17. if(str[i]=='n' && str[i+1]=='o' && str[i+2]=='t'){
  18. if((str.size()>3 && str[0]=='n' && str[1]=='o' && str[2]=='t' && str[3]==' ') || (i>0 && i+3<str.size() && str[i-1]==' ' && str[i+3]==' '))
  19. k=1;
  20. else if(j>2 && str[j]=='t' && str[j-1]=='o' && str[j-2]=='n')
  21. k=1;
  22. }
  23.  
  24. }
  25. if(k)
  26. cout<<"Real Fancy"<<endl;
  27. else cout<<"regularly fancy"<<endl;
  28. }
  29.  
  30.  
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 15240KB
stdin
2
i do not have any fancy quotes
when nothing goes right go left
stdout
Real Fancy
regularly fancy