RECURSION-CODES OF THE STRING, More then correct answers in output

Code: https://ide.codingblocks.com/s/70091
HB: https://hack.codingblocks.com/contests/c/254/346

Getting correct answer but with some other strings added…

Input:
1125

My Output:
aabe
aay
ale
ay //unexpected, why?
kbe
ky
le //unexpected, why?
y //unexpected, why?

Correct Output:
aabe
aay
ale
kbe
ky

What’s wrong with my code?

Thank you.

Solved on Whatsapp…:slight_smile:

https://ide.codingblocks.com/s/70271
Try this