s = list(input()) l = [] for i in s: l.append(s.count(i)) c1 = l.count(1) c2 = l.count(2) if c1 == 1 and c2 == len(l) - 1: print(s[l.index(1)]) else: print('Impossible')