S = input() D = [0] * 13 for s in S: D[ord(s) - 97] += 1 z = 0 t = 0 p = None for i in range(13): if D[i] == 0: z += 1 p = chr(i + 97) elif D[i] == 1: continue elif D[i] == 2: t += 1 else: print('Impossible') break else: if z == t == 0: for s in 'abcdefghijklm': print(s) elif z == 1 and t == 1: print(p) else: print('Impossible')