S = input() L = [s for s in S if S.count(s) != 2] print(L[0] if len(L) == 1 else 'Impossible')