#include int main() { char s[14]; int f = 0; scanf("%s",&s); for (int i = 0;i < 12;i++) { int c = 0; for (int j = i + 1;j < 13;j++) { if (s[i] == s[j]) c++; if (c) { f++; break; } } } if (f != 6) { puts("Impossible"); return 0; } for (int i = 0;i < 13;i++) { for (int j = 0;j < 13;j++) { if (i == j)continue; if (s[i] == s[j]) break; if (j == 12) printf("%c\n",s[i]); } } }