from collections import defaultdict dic = defaultdict(int) s = list(input()) for k in s: dic[k] += 1 num, ans = 0, "" if max(dic.values()) >= 3: num = 3 else: for k, v in dic.items(): if v == 1: num += 1 ans = k if num == 1: print(ans) else: print("Impossible")