s = input() l = [] for i in s: if s.count(i) > 2: print('Impossible') break elif s.count(i) == 1: l.append(i) if len(l) != 1: print('Impossible') else: print(*l)