# -*- coding: utf-8 -*- """ No.548 国士無双 https://yukicoder.me/problems/no/548 """ import sys from sys import stdin input = stdin.readline def solve(S): res = [] for c in "abcdefghijklm": T = S + c d = [0] * 13 match = True for t in T: if 'a' <= t <= 'm': d[ord(t)-ord('a')] += 1 else: match = False break if max(d) > 2 or min(d) < 1: match = False if match: res.append(c) return res def main(args): S = input().strip() res = solve(S) if res == []: print("Impossible") else: print(*res, sep='\n') if __name__ == '__main__': main(sys.argv[1:])