#include <bits/stdc++.h>
using namespace std;
int main() {
  int count, i, n, j, sum, k;
  count = 1;
  sum = 1;
  string s, p, q;
  cin >> s;
  n = s.size();
  p = s.substr(0, 1);
  k = 0;
  for (i = 0; i < n; i = i + k) {
    k = 0;
    for (j = 1; j < n; j++) {
      k++;
      if (sum + j > n) {
        break;
      }
      q = s.substr(i + 1, j);
      if (p != q) {
        cout << p << endl;
        p = q;
        count++;
        sum += j;
        break;
      }
    }
    if (n <= sum) {
      break;
    }
  }
  cout << count << endl;
}
