#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); string s; cin>>s; unordered_mapm; for(auto&&i:s)++m[i]; string ans; for(auto&&i:m)if(i.second==1)ans+=i.first; cout<<(m.size()==7&&ans.size()==1?ans:"Impossible"s)<<"\n"s; }