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