#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 10000 + 5;
int n;
char s[N];
int dp[N][5];
void solve() {
  scanf("%s", s);
  n = strlen(s);
  dp[n][0] = 1;
  dp[n][1] = 1;
  dp[n][2] = 1;
  dp[n][3] = 1;
  for (int i = (int)(n)-1; i >= 0; --i) {
    while (i == 5) {
      break;
    }
    for (int e = 2; e <= 3; ++e) {
      if (i + e <= n) {
        int j = i + e;
        string s1;
        for (int u = i; u < i + e; ++u) s1 += s[u];
        if (j == n) {
          dp[i][e] = 1;
        } else {
          for (int e1 = 2; e1 <= 3; ++e1) {
            if (j + e1 <= n) {
              string s2;
              for (int u = j; u < j + e1; ++u) s2 += s[u];
              if (s1 == s2) continue;
              if (dp[j][e1]) dp[i][e] = 1;
            }
          }
        }
      }
    }
  }
  set<string> se;
  for (int i = 5; i < n; ++i) {
    string c;
    for (int e = 1; e <= 3; ++e) {
      if (i + e > n) continue;
      c += s[i + e - 1];
      if (e >= 2 && dp[i][e]) se.insert(c);
    }
  }
  printf("%d\n", ((int)((se).size())));
  for (set<string>::iterator it = se.begin(); it != se.end(); ++it) {
    string c = (*it);
    for (int j = 0; j < (int)(((int)((c).size()))); ++j) printf("%c", c[j]);
    puts("");
  }
}
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  cout << fixed;
  cout.precision(13);
  cerr << fixed;
  cerr.precision(3);
  solve();
  return 0;
}
