NZEC problem not able to figure out.(JAVA)

Hi I’m trying to solve FANCY QUOTES problem here in https://www.codechef.com/JAN19B/problems/FANCY.

I’m able to pass it in my IntellijIDEA but not able to do that in Codechef IDE. Please tell me where I’m going wrong.

import java.util.;
import java.io.
;

public class Main {

public static void main(String[] args) throws IOException{

    Scanner s = new Scanner(System.in);
    int t=s.nextInt();
    s.nextLine();

    while(t>0)
    {
        String string = s.nextLine();
        boolean flag = false;

        

        for (int i=1;i<string.length()-1;i++)
        {
            if (string.charAt(i-1)=='n' && string.charAt(i)=='o' && string.charAt(i+1)=='t')
            {
                System.out.println("Real Fancy");
                flag=true;
                break;
            }
        }

        if (!flag)
        {
            System.out.println("regular Fancy");
        }

        t--;
    }
}

}

Error I’m getting is :