Java NZEC Runtime Error

Facing NZEC Runtime error while running below code in codechef editor. However, same works fine in eclipse. Please help.

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

class TestClass 
{
	public static void main(String args[]) throws Exception 
	{
		Scanner sc = new Scanner(System.in);
		int test = sc.nextInt();
		Pattern p = Pattern.compile(".*\\bnot\\b.*");
		while (test-- > 0) 
		{
			String quote = sc.nextLine();
			Matcher m = p.matcher(quote);
			if(m.find())
				System.out.println("Real Fancy");
			else
				System.out.println("regularly fancy");
		}
		sc.close();
	}
}

Hello,
I am facing the same problem. Can anyone answer this?
Thank you in advance.