#include <bits/stdc++.h>
using namespace std;
bool dp[100010][2];
int main() {
  string s;
  set<string> Set;
  cin >> s;
  int n = s.length();
  s += '$';
  dp[n - 2][0] = dp[n - 3][1] = true;
  for (int i = n - 4; i >= 5; i--) {
    if (dp[i + 2][1] ||
        dp[i + 2][0] && (s[i] != s[i + 2] || s[i + 1] != s[i + 3]))
      dp[i][0] = true;
    if (dp[i + 3][0] ||
        dp[i + 3][1] &&
            (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5]))
      dp[i][1] = true;
  }
  for (int i = 5; i < n; i++) {
    if (dp[i][0]) {
      string cur;
      cur += s[i];
      cur += s[i + 1];
      Set.insert(cur);
    }
    if (dp[i][1]) {
      string cur;
      cur += s[i];
      cur += s[i + 1];
      cur += s[i + 2];
      Set.insert(cur);
    }
  }
  cout << Set.size() << endl;
  for (set<string>::iterator it = Set.begin(); it != Set.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
