MiQ interview question

print all combinations of given string