# No.548 国士無双 s = input() cards = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'] nums = [0] * 13 for i in range(13): nums[i] = s.count(cards[i]) if max(nums) == 1: for i in cards: print(i) elif max(nums) == 2 and nums.count(2) == 1: print(cards[nums.index(0)]) else: print('Impossible')