#include <bits/stdc++.h>
using namespace std;
const int N = 20110;
char p[N];
bool dp[N][4];
vector<string> ans;
int n;
string str(int u, int v) {
  string ans = "";
  for (int i = u; i <= v; i++) ans = ans + p[i];
  return ans;
}
int main() {
  scanf("%s", p + 1);
  n = strlen(p + 1);
  dp[n + 1][2] = dp[n + 1][3] = true;
  for (int i = n - 1; i > 5; i--) {
    dp[i][2] =
        dp[i + 2][3] || (dp[i + 2][2] && str(i, i + 1) != str(i + 2, i + 3));
    dp[i][3] =
        dp[i + 3][2] || (dp[i + 3][3] && str(i, i + 2) != str(i + 3, i + 5));
    if (dp[i][2]) ans.push_back(str(i, i + 1));
    if (dp[i][3]) ans.push_back(str(i, i + 2));
  }
  sort(ans.begin(), ans.end());
  ans.resize(unique(ans.begin(), ans.end()) - ans.begin());
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
}
