def main(): s = input() s = sorted(s) c="" for i in range(int(len(s)/2)): if s[0] == s[1]: del s[:2] elif (c==""): c=s[0] del s[:1] else: print("Impossible\n") return if (c!=""): print(c) else: print(s[-1]) main()