from collections import Counter counter = Counter(list(input())) ans = 'Impossible' for s, cnt in counter.items(): if cnt == 1: if ans == 'Impossible': ans = s else: print('Impossible') exit() elif cnt > 2: print('Impossible') exit() print(ans)