s = str(input()) X = [0]*13 for i in range(len(s)): X[ord(s[i])-ord('a')] += 1 import copy Y = copy.copy(X) Y.sort() p1 = [0]+[1]*11+[2] p2 = [1]*13 if Y == p1: for i in range(13): if X[i] == 0: print(chr(i+ord('a'))) exit() if Y == p2: for i in range(13): print(chr(i+ord('a'))) exit() print('Impossible')