s = input() d = {} for c in s: if c in d: d[c] += 1 else: d[c] = 1 m = [] for k, v in d.items: if v >= 3: print("Impossible") break elif v == 1: m.append(k) else: if len(m) == 1: print(m) else: print("Impossible")