#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const long long INF = 1e18;
const long long MOD = 1000000007;
set<string> ss;
bool dp[10005][5];
int main() {
  string s;
  cin >> s;
  int n = s.size();
  dp[n][2] = dp[n][3] = true;
  for (int i = n - 1; i >= 5; i--) {
    if (dp[i + 2][3]) dp[i][2] = true;
    if (i + 3 < n && s.substr(i, 2) != s.substr(i + 2, 2) && dp[i + 2][2])
      dp[i][2] = true;
    if (dp[i + 3][2]) dp[i][3] = true;
    if (i + 5 < n && s.substr(i, 3) != s.substr(i + 3, 3) && dp[i + 3][3])
      dp[i][3] = true;
  }
  for (int i = 5; i < n; i++) {
    if (dp[i][2]) ss.insert(s.substr(i, 2));
    if (dp[i][3]) ss.insert(s.substr(i, 3));
  }
  cout << ss.size() << endl;
  for (set<string>::iterator it = ss.begin(); it != ss.end(); it++)
    cout << *it << endl;
  return 0;
}
