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

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

Problem details: LAPIN Problem - CodeChef

solution: CodeChef: Practical coding for everyone

Consider the test input:

1
gq