#include <bits/stdc++.h>
using namespace std;
int dp[2][10007];
vector<int> sol, a;
int main() {
  fill(dp[0], dp[0] + 10007, false);
  fill(dp[1], dp[1] + 10007, false);
  string s;
  cin >> s;
  int n = s.size();
  if (n <= 6) {
    cout << "0";
    return 0;
  }
  dp[0][n - 1] = true;
  dp[1][n - 1] = true;
  for (int i = n - 1; i >= 4; --i) {
    if (dp[1][i]) {
      if (s[i] != s[i + 3] || s[i - 1] != s[i + 2] || s[i - 2] != s[i + 1]) {
        dp[1][i - 3] = true;
        if (i >= 7)
          a.push_back((s[i] - 'a') + (s[i - 1] - 'a') * 30 +
                      (s[i - 2] - 'a') * 900);
      }
      if (i >= 6) a.push_back((s[i] - 'a') * 30 + 900 * (s[i - 1] - 'a') - 1);
      dp[0][i - 2] = true;
    }
    if (dp[0][i]) {
      if (s[i] != s[i + 2] || s[i - 1] != s[i + 1]) {
        dp[0][i - 2] = true;
        if (i >= 6) a.push_back((s[i] - 'a') * 30 + 900 * (s[i - 1] - 'a') - 1);
      }
      if (i >= 7)
        a.push_back((s[i] - 'a') + (s[i - 1] - 'a') * 30 +
                    (s[i - 2] - 'a') * 900);
      dp[1][i - 3] = true;
    }
  }
  sort(a.begin(), a.end());
  int l = a.size();
  sol.push_back(a[0]);
  for (int i = 1; i < l; ++i) {
    if (a[i] != a[i - 1]) sol.push_back(a[i]);
  }
  cout << sol.size() << endl;
  l = sol.size();
  for (int i = 0; i < l; ++i) {
    int cur = sol[i];
    char ch = cur / 900 + 'a';
    if (cur % 30 == 29) {
      cur++;
      cur /= 30;
      ch = cur / 30 + 'a';
      cout << ch;
      ch = cur % 30 + 'a';
      cout << ch << endl;
    } else {
      ch = cur / 900 + 'a';
      cout << ch;
      ch = (cur / 30) % 30 + 'a';
      cout << ch;
      ch = cur % 30 + 'a';
      if (ch != '`') cout << ch;
      cout << endl;
    }
  }
  return 0;
}
