s = input().strip() counts = [0] * 26 for c in s: counts[ord(c) - ord('a')] += 1 # Check if any character appears more than twice if any(c > 2 for c in counts): print("Impossible") else: k = sum(1 for c in counts if c == 2) m = sum(1 for c in counts if c == 1) total_non_zero = k + m if k == 6 and m == 1 and total_non_zero == 7: # Find the character that occurs once for i in range(26): if counts[i] == 1: print(chr(ord('a') + i)) break else: print("Impossible")