import sys def main(): S = input() one_char = [] list_S = list(S) for s in set(list_S): if list_S.count(s) == 2: continue elif list_S.count(s) == 1: one_char.append(s) else: print("Impossible") sys.exit() #print(one_char) if len(one_char) == 1: print(one_char[0]) else: print("Impossible") if __name__ == '__main__': main()