#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000009;
const double eps = 1e-9;
const int mod = 1000000007;
bool x[10050], y[10050];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  vector<string> ans;
  int i = s.size() - 2;
  for (; i >= 5; --i) {
    if (i == s.size() - 2)
      ans.push_back(s.substr(i, 2)), x[i] = 1;
    else if (i == s.size() - 3)
      ans.push_back(s.substr(i, 3)), y[i] = 1;
    else {
      if (y[i + 2] == 1 ||
          (x[i + 2] == 1 && s.substr(i, 2) != s.substr(i + 2, 2)))
        ans.push_back(s.substr(i, 2)), x[i] = 1;
      if (x[i + 3] == 1 ||
          (y[i + 3] == 1 && s.substr(i, 3) != s.substr(i + 3, 3)))
        ans.push_back(s.substr(i, 3)), y[i] = 1;
    }
  }
  sort(ans.begin(), ans.end());
  ans.erase(unique(ans.begin(), ans.end()), ans.end());
  cout << ans.size() << "\n";
  for (int j = 0; j < ans.size(); ++j) {
    cout << ans[j] << "\n";
  }
}
