Runtime error (NZEC) in FANCY

I am getting Run Time (NZEC) Error in the Codechef January Challenge 2019 question Fancy Quotes. The link to the question is : CodeChef: Practical coding for everyone

Can anyone help me?Link to my solution is skhW0S - Online Java Compiler & Debugging Tool - Ideone.com

Same here pls help…
If i give custom input and run the code then it runs fine but not otherwise

I was facing the same problem i won’t tell you the solution but the code will pass if u can pass the code for these
4 testcases :

  1. n
  2. no
  3. not
  4. any random string

Hmm, releasing a solution to an ongoing contest is definitely NOT going to get me banned right? :thinking: