A = 'abcdefghijklm' S = input() K = [] for c in A: N = [] T = S + c for j in A: N.append(T.count(j)) if N.count(1) == 12 and N.count(2) == 1: K.append(c) print('Impossible' if len(K) == 0 else '\n'.join(K))