#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long M = 1000000000;
const int dir_4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir_8[8][2] = {{1, 0},  {1, 1},   {0, 1},  {-1, 1},
                         {-1, 0}, {-1, -1}, {0, -1}, {1, -1}};
string s;
int main() {
  cin >> s;
  int cnt = 0;
  int siz = s.size();
  for (int i = 0; i < siz - 1; i++) {
    cout << s << endl;
    if (s[i] != s[i + 1]) {
      cnt++;
      s.erase(i, 2);
      siz -= 2;
      i -= 2;
      i = max(-1, i);
    }
  }
  cout << cnt * 2;
  cout << endl;
  return 0;
}
