from collections import Counter as c s=input() l=set("abcdefghijklmm")-set(s) d={j:i for i,j in c(s).items()} if 2 in d and len(l)==1: print(l.pop()) elif not 2 in d and not l: print(*sorted(s),sep="\n") else: print("Impossible")