#include <bits/stdc++.h>
using namespace std;
int main() {
  string S, T;
  cin >> S;
  map<string, int> mp;
  int front = 0;
  for (int i = 0; i < S.size(); i++) {
    if (mp.count(S.substr(front, i + 1 - front)) == 1) {
      continue;
    } else {
      cout << S.substr(front, i + 1 - front) << endl;
      mp[S.substr(front, i + 1 - front)];
      front = i + 1;
    }
  }
  cout << mp.size() << endl;
  return 0;
}
