#include <bits/stdc++.h>
using namespace std;
ifstream fin("alfa.in");
ofstream fout("alfa.out");
string s;
bool dp[10001][4];
string rasp[20001];
int main() {
  int i, n, k = 0, rs = 0;
  cin >> s;
  n = s.size();
  s = s + "000";
  if (n >= 7) {
    dp[n - 2][2] = 1;
    rasp[++k] = s[n - 2];
    rasp[k] += s[n - 1];
  }
  if (n >= 8) {
    dp[n - 3][3] = 1;
    rasp[++k] = s[n - 3];
    rasp[k] += s[n - 2];
    rasp[k] += s[n - 1];
  }
  for (i = n - 4; i > 4; i--) {
    dp[i][2] = dp[i + 2][3] |
               (dp[i + 2][2] && (s[i] != s[i + 2] || s[i + 1] != s[i + 3]));
    dp[i][3] = dp[i + 3][2] |
               (dp[i + 3][3] && (s[i] != s[i + 3] || s[i + 1] != s[i + 4] ||
                                 s[i + 2] != s[i + 5]));
    if (dp[i][2] == 1) {
      rasp[++k] = s[i];
      rasp[k] += s[i + 1];
    }
    if (dp[i][3] == 1) {
      rasp[++k] = s[i];
      rasp[k] += s[i + 1];
      rasp[k] += s[i + 2];
    }
  }
  sort(rasp + 1, rasp + k + 1);
  for (i = 1; i <= k; i++)
    if (rasp[i - 1] != rasp[i]) rs++;
  cout << rs << '\n';
  for (i = 1; i <= k; i++)
    if (rasp[i - 1] != rasp[i]) cout << rasp[i] << '\n';
  return 0;
}
