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