#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int sum = 0;
  cin >> s;
  string pre;
  pre = s[0];
  sum = 1;
  cout << pre << endl;
  for (int i = 1; i < s.length(); i++) {
    string now;
    now = s[i];
    while (pre == now) {
      i++;
      now += s[i];
    }
    sum++;
    pre = now;
    cout << pre << endl;
  }
  cout << sum << endl;
  return 0;
}
