Recursion, codes of the string question

Could anyone please help me with this question?

The question says all possible code, like for the given example 1125
1,1,2,5 -> a a b e
1,1,25 -> aay
1, 12, 5 -> ale
11, 2, 5 -> kbe
11, 25 -> ky

So use recursion to solve the problem.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.