s=input() ans = [0]*30 for i in s: ans[int(ord(i))-97] +=1 if ans.count(2) == 6 and ans.count(1) == 1: print(chr(ans.index(1)+97)) else: print('Impossible')