nums = [0 for _ in range(26)] for c in input(): nums[ord(c) - 97] += 1 ans = '' for i, num in enumerate(nums): if num > 2: print('Impossible') exit() elif num == 1: if not ans == '': print('Impossible') exit() else: ans = chr(i + 97) print(ans)