S = input() N = len(S) ans = [] def dfs(n,s): if n == (1 << N) - 1: ans.append(s) return for i in range(N): if (n >> i) & 1 == 0: dfs(n | (1<