N = list(input()) ans=[N.count(N[x]) for x in range(len(N))] print(ans) if (ans.count(1)==1)and(ans.count(2)==12): print(N[ans.index(1)]) else: print("Impossible")