#include <bits/stdc++.h>
using namespace std;
int vector_finder(vector<string> vec, string number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  string a;
  cin >> a;
  int we = a.length();
  vector<string> ans;
  ans.push_back(a.substr(0, 1));
  for (int i = 1; i < we; i++) {
    for (int j = 1; j < we - i; j++) {
      if (vector_finder(ans, a.substr(i, j)) == 0) {
        cout << vector_finder(ans, a.substr(i, j)) << endl;
        ans.push_back(a.substr(i, j));
        break;
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  cout << ans.size() << endl;
  return 0;
}
