#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4 + 10;
int N;
string S;
bool dp[MAXN][4];
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
  }
  ios::sync_with_stdio(false);
  cin >> S;
  N = S.size();
  S += "!@#$";
  dp[N - 2][2] = true;
  dp[N - 3][3] = true;
  for (int i = N - 4; i >= 5; i--) {
    for (int j = 2; j <= 3; j++) {
      string sij = S.substr(i, j);
      for (int k = 2; k <= 3; k++) {
        if (dp[i + j][k] && sij != S.substr(i + j, k)) {
          dp[i][j] = true;
          break;
        }
      }
    }
  }
  set<string> ans;
  for (int i = 5; i <= N - 2; i++) {
    for (int j = 2; j <= 3; j++) {
      if (dp[i][j]) {
        ans.insert(S.substr(i, j));
      }
    }
  }
  cout << ans.size() << endl;
  for (string s : ans) {
    cout << s << '\n';
  }
}
