#include #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair P; string s; int cnt[28]; int main(void){ cin >> s; int n=s.size(); for(int i=0;i2){ flag=false; } if(cnt[i]==2)two++; if(cnt[i]==1){ one++; v=i; } } if(one>=2 || two!=6)flag=false; if(one!=1)flag=false; if(flag){ printf("%c\n",('a'+v)); }else{ printf("Impossible\n"); } return 0; }