from collections import Counter S = Counter(input()) ans = '' flag = False for k,v in S.items(): if v == 1: if ans: flag = False break ans = k flag = True elif v == 2: continue else: flag = False break print(ans if flag else 'Impossible')