Https://www.codechef.com/viewsolution/42886892

Can someone please help me out in finding the error for Lapindrome code:

Problem details: Contest Page | CodeChef

solution: Solution: 42886892 | CodeChef

Consider the test input:

1
gq