#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  string a[n];
  a[0] = s[0];
  int t = 1;
  for (int i = 1; i < n; i++) {
    a[t] += s[i];
    cout << a[t] << endl;
    if (a[t] == a[t - 1])
      continue;
    else
      t++;
  }
  printf("%d\n", t);
}
