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