from collections import Counter S = list(input()) counter = Counter(S) if max(counter.values()) > 2: print("Impossible") exit() S.sort() s = ''.join(S) t = "abcdefghijklm" if s == t: for i in range(13): print(s[i]) else: for i in range(13): if t[i] not in s: print(t[i]) break