S = set(input()) T = 'abcdefghijklm' s = set(T) t = s - S print('Impossible' if len(t) > 1 else ['\n'.join(T), *t][len(t) == 1])