#include int main() { int arr[26]={}, i; char s[15]; scanf("%s", s); for (i=0; s[i]!='\0'; i++) { arr[s[i]-'a']++; } int one, onecnt=0, twocnt=0; for (i=0; i<26; i++) { if (arr[i]==1) { onecnt++; one=i; } else if (arr[i]>2) { twocnt=1; } } if (onecnt>1 || twocnt) { printf("Impossible\n"); } else { printf("%c\n", one+'a'); } return 0; }