Program to find all the possible combinations of a string