Java NullPointerException on FastReader nextInt()

I am trying to run this code for many days now. The code works fine for test cases in custom input but shows a NullPointerException while running. Can someone please help me solve this issue. I am attaching the link of my code below.

https://www.codechef.com/viewsolution/35088012