The output should be like this Input: set[] = {\'a\', \'b\'}, k = 3
Output: aaa aab aba abb baa bab bba bbb