from collections import Counter d = Counter(input()) if len(d) == 7: c = 0 for k,v in d.items(): if v == 0: break elif v==1: c = k else: print(c) exit() print("Impossible")