Print all subsequences of a string
You are given a string, you have to print all the subsequences of the string in lexicographical order.
The above problem wants you to print all possible arrangement of the string, that is using string length 1 to maximum valid length and also the string should be in lexicographical order which means according to dictionary appearance or sorted sequence.
The first line of the input consist of T number of test cases, each test case consist of a string str.
You need to print all the subsequences of the given string int lexicographical order separated by new line.