S=input() p=[c for c in S if S.count(c)!=2] print(["Impossible",p[0]][len(p)==1])