On which test case does it fail? Problem CONCATPAL

Here is my code CodeChef: Practical coding for everyone
It is failing on one test case.

try “aaaa” , “x” these two strings…

Logic is flawed, needs little refinement.

thanks