PALIN: Getting wa

The site refuses to accept my solution and judges it as wrong. I’ve tried various combinations and my output matches with that of the accepted solutions. Could you please tell me what errors might have crept into my code?

Your solution is not printing any output for the following test case.