#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const int maxn = 1e4 + 5;
set<string> st3;
int dp[maxn][4];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s1, sx, sy, sz;
  cin >> s1;
  int len = s1.size();
  if (len <= 6)
    cout << 0 << endl;
  else {
    if (len >= 7) {
      dp[len - 2][2] = 1;
      sx = "";
      sx = sx + s1[len - 2] + s1[len - 1];
      st3.insert(sx);
    }
    if (len >= 8) {
      dp[len - 3][3] = 1;
      sx = "";
      sx = sx + s1[len - 3] + s1[len - 2] + s1[len - 1];
      st3.insert(sx);
    }
    for (int i = len - 4; i >= 5; i--) {
      sx = "";
      sy = "";
      sx = sx + s1[i] + s1[i + 1];
      sy = sy + s1[i + 2] + s1[i + 3];
      if ((sx != sy && dp[i + 2][2]) || dp[i + 2][3]) {
        dp[i][2] = 1;
        st3.insert(sx);
      }
      sx = "";
      sy = "";
      sx = sx + s1[i] + s1[i + 1] + s1[i + 2];
      sy = sy + s1[i + 3] + s1[i + 4] + s1[i + 5];
      if ((sx != sy && dp[i + 3][3]) || dp[i + 3][2]) {
        dp[i][3] = 1;
        st3.insert(sx);
      }
    }
    cout << st3.size() << endl;
    for (auto& it : st3) cout << it << endl;
  }
}
