Recursion-AllSubsequence Lexicographically


What is wrong in the code? I tried the test case ans it was running correctly also i ran a test for other words such as xyz, coding. It is showing correct output. But the test case is not passing.