S = list(input()) while True: for c in S: if S.count(c) == 2: S.remove(c) S.remove(c) break if c == S[-1]: print(S[0] if len(S) == 1 else 'Impossible') exit()