Doubt in Recursion-All Subsequences

The code is running fine for the given input ab but while submitting on hacker blocks, the test case is not being passed.
Question
RECURSION - ALL SUBSEQUENCES
Print all the subsequences of a string in lexicographical order.

Input Format:
First line contains an integer N, the no of strings.
Next, N lines follows one string per line.

Constraints:
1 < len(str) < 20

Output Format:
No of subsequences one per line

Sample Input:
1
ab
Sample Output:

a
ab
b
Explanation:
4 subsequences are printed.
Empty string is a subsequence.
Code https://ide.codingblocks.com/s/116064

In your code empty string is Printed at end
while question say it should print in first line
just make that change
all testcases willl passed

Now I’ve placed the null set first, but still the test case is not being passed.
Here is the code