S = input().strip() dic = {} for i in S: try: dic[i] += 1 except: dic[i] = 1 if len(dic) != 7: print('Impossible') exit(0) lst = [i for i in dic if dic[i] == 1] if len(lst) > 1: print('Impossible') exit(0) print(lst[0])