#include <bits/stdc++.h>
using namespace std;
int vis[255];
int main(int argc, const char *argv[]) {
  string s;
  cin >> s;
  s = (s + s + s);
  for (int i = 27; i < 54; i++) {
    if (vis[s[i]]) {
      if (vis[s[i]] == i - 1) {
        puts("Impossible");
        return 0;
      }
      int m = (vis[s[i]] + i) / 2;
      for (int j = m + 1; j < m + 1 + 13; j++) {
        cout << s[j];
      }
      cout << endl;
      for (int j = m; j > m - 14; j--) {
        if (s[j] != s[i]) cout << s[j];
      }
      cout << endl;
    }
    vis[s[i]] = i;
  }
  return 0;
}
