S = input() cnt = [0] * 26 for i in range(13): cnt[ord(S[i]) - ord("a")] += 1 if cnt.count(2) != 6: print("Impossible") else: print(chr(ord("a") + cnt.index(1)))