S = input() _set = set(S) can_pair = len(_set) == 7 ans = "Impossible" if can_pair: for s in _set: if S.count(s) == 1: ans = s break print(ans)