ASCII subsequence, can't understand the pattern in which we need to output the result

Continuing the discussion from Ascii Subsequences:

I also tried this question and got the wrong answer in each test case, here is the solution, I used set to store the result strings but the question is not asking for them in sorted order. Please clarify. And I also want to know if we need to consider all 128 characters or just [a-z] my code is working for later case alone, Thanks.