from collections import * C = Counter(input()) ans = -1 two = 0 for i in range(13): c = chr(ord("a") + i) if C[c] >= 3: print("Impossible") exit() if C[c] == 2: if two == 0: two += 1 else: print("Impossible") exit() elif C[c] == 0: if ans != -1: print("Impossible") exit() else: ans = c if ans == -1: for i in range(13): c = chr(ord("a") + i) print(c) else: print(ans)