#!/usr/bin/env python3 import sys def main(): S = input() l = [0] * 13 for ss in S: l[ord(ss) - ord("a")] += 1 # 0 2 1つ # 1 全て if l == [1] * 13: print(*"abcdefghijklm", sep="\n") return if sorted(l) == [0] + [1] * 11 + [2]: print(chr(l.index(0) + ord("a"))) return print("Impossible") return if __name__ == '__main__': main()