#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10000 + 5;
bool dp[MAXN][4];
set<string> s;
string A;
void solve(int n) {
  memset(dp, 0, sizeof(dp));
  for (int i = n - 1; i >= 5; i--) {
    for (int j = 2; j <= 3; j++) {
      if (i + j == n) {
        dp[i][j] = 1;
      } else {
        for (int k = 2; k <= 3; k++) {
          if (i + j + k <= n && (A.substr(i, j) != A.substr(i + j, k))) {
            dp[i][j] |= dp[i + j][k];
          }
        }
      }
      if (dp[i][j]) s.insert(A.substr(i, j));
    }
  }
  printf("%d\n", (int)s.size());
  for (set<string>::iterator it = s.begin(); it != s.end(); it++)
    cout << *it << endl;
}
int main() {
  cin >> A;
  solve(A.length());
  return 0;
}
