For this Question: Given a string S. The task is to print all permutations of the characters in the given string.The only line of input contains a string S with all distinct uppercase letters of the English alphabet.

Constraints:-
1<=|S|<=8Print all permutations of a given string S with single space and all permutations should be in lexicographically increasing order.Sample Input:
ABC

Sample Output:
ABC ACB BAC BCA CAB CBA, I have written this Solution Code: from itertools import permutations
s = input()
l1 = list(s)
s1 = "".join(sorted(l1))
l = permutations(s1,len(s1))
for i in l:
	print("".join(i),end=" "), In this Programming Language: Python, Now tell me if this Code is compilable or not?