#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > dp;
set<string> S;
string s;
vector<vector<string> > Substr;
vector<int> Len;
int solve(int index, int mode) {
  if (dp[index][mode] != -1) return dp[index][mode];
  if (index + 1 <= 4) return dp[index][mode] = 0;
  if (Substr[index - 1][2] != Substr[index + 1][Len[mode]]) {
    if (solve(index - 2, 0)) {
      S.insert(Substr[index - 1][2]);
    }
  }
  if (Substr[index - 2][3] != Substr[index + 1][Len[mode]]) {
    if (solve(index - 3, 1)) {
      S.insert(Substr[index - 2][3]);
    }
  }
  return dp[index][mode] = 1;
}
int main() {
  cin >> s;
  Len.assign(2, 0);
  Len[0] = 2;
  Len[1] = 3;
  int n = (s).size();
  dp.assign(n, vector<int>(2, -1));
  Substr.assign(n, vector<string>(4, " "));
  for (int i = 0 - (0 > n); i != n - (0 > n); i += 1 - 2 * (0 > n)) {
    for (int j = i - (i > n); j != n - (i > n); j += 1 - 2 * (i > n)) {
      if (j - i + 1 > 3) continue;
      Substr[i][j - i + 1] = s.substr(i, j - i + 1);
    }
  }
  if (solve(n - 3, 0)) S.insert(Substr[n - 2][Len[0]]);
  if (solve(n - 4, 1)) S.insert(Substr[n - 3][Len[1]]);
  cout << (S).size() << "\n";
  for (auto& e : S) {
    cout << e << "\n";
  }
  return 0;
}
