Given a string of length n, print all permutation of the given string. and repetition of characters is allowed!.
There are few examples below:
Case1:
Input: A
output: A
Case2:
Input: AB
output: AA AB BA BB
S
S: the input string ( 2 <= len(S)) < 7)
Note : the input string only contain alpha characters included upercase and lowercase.
Note : each element of input string is different.
Ouput the permutation with repetition pattern (each output string followed by a newline characters)