pai = list(input()) ans_char = '' is_correct = True for ch in pai: if pai.count(ch) == 1: if ans_char == '': ans_char = ch else: is_correct = False break elif pai.count(ch) == 2: pass elif pai.count(ch) >= 3: is_correct = False break if is_correct: print(ans_char) else: print('Impossible')