s=list(input()) t=list(set(s)) if len(t)!=7: print("Impossible") exit() for x in t: if s.count(x)==1: print(x) exit()