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