Need Test Cases for XRQRS (Jan'15 Long)

getting WA in tasks: 1,4,5,6,10,11

Can anyone please give any test cases for which my code is failing.

I am following the editorial logic i.e tries.

My code link

Thanks

Just generate random tests.

tried a lot but still getting wrong answers.