#include <bits/stdc++.h>
using namespace std;
const int NMAX = 10005;
int n, dp[2][NMAX];
char s[NMAX];
set<string> S;
string Str(int x, int y) {
  string aux = "";
  for (int i = x; i <= y; i++) aux += s[i];
  return aux;
}
int main() {
  int i, j, l;
  cin.sync_with_stdio(false);
  cin >> (s + 1);
  n = strlen(s + 1);
  dp[0][n + 1] = dp[1][n + 1] = 1;
  for (i = n; i >= 6; i--) {
    for (j = 0; j <= 1; j++)
      if ((i + j + 1) <= n)
        for (l = 0; l <= 1; l++)
          if (dp[l][i + j + 2] == 1) {
            if (Str(i, i + j + 1) != Str(i + j + 2, i + j + 2 + l + 1)) {
              dp[j][i] = 1;
              S.insert(Str(i, i + j + 1));
            }
          }
  }
  cout << S.size() << "\n";
  for (auto it : S) cout << it << "\n";
  return 0;
}
