import sys sample = "abcdefghijklm" def main(): S = input() if is_include_invalid_char(S): print("Impossible") sys.exit() if len(set(S)) == 13: for s in list(sample): print(s) elif len(set(S)) == 12: for x, y in zip(list(sample), sorted(list(set(S)))): if not x == y: print(x) sys.exit() print(sample[-1]) else: print("Impossible") def is_include_invalid_char(values): for s in list(values): if not s in sample: return True return False if __name__ == '__main__': main()