#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
int dp[N][5], n;
set<string> ans;
string s;
int main() {
  cin >> s;
  n = s.size();
  s = '.' + s;
  if (n <= 6)
    puts("0");
  else {
    dp[n + 1][2] = dp[n + 1][3] = 1;
    for (int i = n - 1; i > 5; i--) {
      if (i <= n - 3)
        dp[i][2] = (s.substr(i, 2) == s.substr(i + 2, 2) ? 0 : dp[i + 2][2]) ||
                   dp[i + 2][3];
      else
        dp[i][2] = dp[i + 2][2];
      if (i <= n - 5)
        dp[i][3] = (s.substr(i, 3) == s.substr(i + 3, 3) ? 0 : dp[i + 3][3]) ||
                   dp[i + 3][2];
      else
        dp[i][3] = dp[i + 3][2] || dp[i + 3][2];
      if (dp[i][2]) ans.insert(s.substr(i, 2));
      if (dp[i][3]) ans.insert(s.substr(i, 3));
    }
    cout << ans.size() << endl;
    for (set<string>::iterator it = ans.begin(); it != ans.end(); it++)
      cout << *it << endl;
  }
  return 0;
}
