I dont know in which case its failing
#include<iostream>
#include<cstdio>
#include<cstring>
// for <streamsize>
#include<ios>
// for numeric_limits
#include<limits>
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
int main()
{
FAST_IO
int T;
cin>>T;
while(T--)
{
int flag=0,k;
char S[100];
scanf("\n");
scanf("%[^\n]%*c",S);
for(k=0;S[k]!='\0';k++);
//cout<<k<<endl;
for(int i=0;i<k;i++)
{
if((S[i]=='n' && i==0)||(S[i]=='n' && S[i-1]==' '))
{
if(S[i+1] == 'o')
{
if(S[i+2]== 't')
{
if(S[i+3] == ' ' || S[i+3] == '\0' )
{
flag=1;
// break;
}
}
}
}
}
if(flag == 1)
cout<<"Real Fancy"<<"\n";
else
cout<<"regularly fancy"<<"\n";
}
return 0;
}