WA in PALIN

I am getting WA for PALIN problem
Please provide some test cases to test
or you can view my code here