#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
char s[100010];
int dp[100010][5], vst[100010];
vector<string> ans;
string ss;
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = n; i >= 1; i--) {
    if (i == n) {
      dp[i][2] = 0;
      dp[i][3] = 0;
      continue;
    }
    if (i == n - 1) {
      dp[i][2] = 1;
      dp[i][3] = 0;
      continue;
    }
    if (i == n - 2) {
      dp[i][2] = 0;
      dp[i][3] = 1;
      continue;
    }
    if (dp[i + 2][3] == 1)
      dp[i][2] = 1;
    else if (dp[i + 2][2] == 1 && (s[i] != s[i + 2] || s[i + 1] != s[i + 3]))
      dp[i][2] = 1;
    else
      dp[i][2] = 0;
    if (dp[i + 3][2] == 1)
      dp[i][3] = 1;
    else if (dp[i + 3][3] == 1 &&
             (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5]))
      dp[i][3] = 1;
    else
      dp[i][3] = 0;
  }
  int k = 0;
  for (int i = 6; i <= n; i++) {
    if (dp[i][2] == 1) {
      ss.clear();
      ss += s[i];
      ss += s[i + 1];
      ans.push_back(ss);
    }
    if (dp[i][3] == 1) {
      ss.clear();
      ss += s[i];
      ss += s[i + 1];
      ss += s[i + 2];
      ans.push_back(ss);
    }
  }
  sort(ans.begin(), ans.end());
  ans.resize(unique(ans.begin(), ans.end()) - ans.begin());
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}
