s = input() dic = {} for i in s: dic.setdefault(i,0) dic[i]+=1 if dic[i]==3: print("Impossible") exit(0) cnt = 0 ans = "" for k,n in dic.items(): if n==1: cnt+=1 if cnt==1: ans=k else: print("Impossible") exit(0) print(ans)