#include int main(){ // 文字列 char str[13]; scanf("%s",str); // 数値変換したaからmの配列 int type[13]; for(int i = 0;i < 13;i ++){ type[i] = i + 97; } // aからmがそれぞれ何個あるか int num[13]; for(int i = 0;i < 13;i ++){ for(int j = 0;j < 13;j ++){ if((int)str[i] == type[j]){ num[j]++; } } } int count = 0; for(int i = 0;i < 13;i ++){ if(num[i] > 2){ printf("Impossible"); return 0; }else if(num[i] == 2){ count++; } } if(count > 1){ printf("Impossible"); }else if(count == 1){ for(int i = 0;i < 13;i ++){ if(num[i] == 0){ printf("%c",str[i]); return 0; } } } }