Getting wrong tescases

my code is running fine for different N’s but still i am getting wrong testcases
my code: https://ide.codingblocks.com/s/100161

ok ok i understood my mistake i was given the spaces between the characters.

marking as resolved in the ask doubt section