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