#include <bits/stdc++.h>
using namespace std;
int dp[4][20000];
int main() {
  string s;
  cin >> s;
  int n = (int)s.size();
  set<string> ans;
  dp[2][n] = dp[3][n] = 1;
  for (int i = n - 2; i >= 5; i--) {
    if (dp[3][i + 2] ||
        (dp[2][i + 2] && s.substr(i, 2) != s.substr(i + 2, 2))) {
      dp[2][i] = 1;
      ans.insert(s.substr(i, 2));
    }
    if (dp[2][i + 3] ||
        (dp[3][i + 3] && s.substr(i, 3) != s.substr(i + 3, 3))) {
      dp[3][i] = 1;
      ans.insert(s.substr(i, 3));
    }
  }
  cout << (int)ans.size() << endl;
  for (auto suffix : ans) {
    cout << suffix << endl;
  }
}
