#include <bits/stdc++.h>
using namespace std;
int tot, num;
string s, ans[20005];
bool dp[2][10005];
int main() {
  cin.sync_with_stdio(false);
  cin >> s;
  int n = s.length();
  if (n <= 6) {
    printf("0\n");
    return 0;
  }
  dp[0][n] = true;
  dp[1][n] = true;
  for (int i = n - 2; i >= 5; i--) {
    string now(s, i, 2);
    string next(s, i + 2, 2);
    dp[0][i] = (now != next) && dp[0][i + 2];
    dp[0][i] = dp[0][i] || dp[1][i + 2];
    if (dp[0][i]) ans[++tot] = now;
    if (i == n - 2) continue;
    string Now(s, i, 3);
    string Next(s, i + 3, 3);
    dp[1][i] = (now != next) && dp[1][i + 3];
    dp[1][i] = dp[1][i] || dp[0][i + 3];
    if (dp[1][i]) ans[++tot] = Now;
  }
  sort(ans + 1, ans + 1 + tot);
  for (int i = 1; i <= tot; i++)
    if (ans[i] != ans[i - 1]) num++;
  cout << num << endl;
  for (int i = 1; i <= tot; i++)
    if (ans[i] != ans[i - 1]) cout << ans[i] << endl;
}
