#include <bits/stdc++.h>
using namespace std;
signed main() {
  string s;
  cin >> s;
  int n = (int)s.size();
  vector<vector<bool>> dp(n, vector<bool>(2));
  dp[n - 1][0] = (n >= 7);
  dp[n - 1][1] = (n >= 8);
  for (int i = n - 3; i >= 6; --i) {
    string sub2 = s.substr(i - 1, 2);
    string sub3 = s.substr(i - 2, 3);
    if (i <= n - 3) {
      string psub2 = s.substr(i + 1, 2);
      if (psub2 != sub2 && dp[i + 2][0]) dp[i][0] = 1;
    }
    if (i <= n - 4) {
      if (dp[i + 3][1]) dp[i][0] = 1;
    }
    if (i >= 7) {
      if (i <= n - 3) {
        if (dp[i + 2][0]) dp[i][1] = 1;
      }
      if (i <= n - 4) {
        string psub3 = s.substr(i + 1, 3);
        if (psub3 != sub3 && dp[i + 3][1]) dp[i][1] = 1;
      }
    }
  }
  set<string> ans;
  for (int i = 6; i < n; ++i) {
    if (dp[i][0]) ans.insert(s.substr(i - 1, 2));
    if (dp[i][1]) ans.insert(s.substr(i - 2, 3));
  }
  cout << ans.size() << "\n";
  for (auto i : ans) cout << i << "\n";
  return 0;
}
