def main(): s = [_ for _ in input()] cnt = 0 for i in list(set(s)): if s.count(i) == 2: continue elif s.count(i) == 1: ans = i cnt += 1 if cnt > 1: ans = "Impossible" break else: ans = "Impossible" break print(ans) if __name__ == "__main__": main()