#include <bits/stdc++.h>
using namespace std;
bool dp[10005][2];
long long int i;
string str;
map<string, int> mp;
map<string, int>::iterator it;
int main() {
  cin >> str;
  long long int n = str.length();
  dp[n - 2][0] = 1;
  dp[n - 3][1] = 1;
  for (i = n - 4; i >= 5; i--) {
    if (dp[i + 2][1] ||
        (dp[i + 2][0] && (str[i] != str[i + 2] || str[i + 1] != str[i + 3])))
      dp[i][0] = 1;
    if (dp[i + 3][0] ||
        (dp[i + 3][1] && (str[i] != str[i + 3] || (str[i + 1] != str[i + 4] ||
                                                   str[i + 2] != str[i + 5]))))
      dp[i][1] = 1;
  }
  for (i = 5; i < n; i++) {
    if (dp[i][0]) {
      string temp = "";
      temp += str[i];
      temp += str[i + 1];
      mp[temp] = 1;
    }
    if (dp[i][1]) {
      string temp = "";
      temp += str[i];
      temp += str[i + 1];
      temp += str[i + 2];
      mp[temp] = 1;
    }
  }
  cout << mp.size() << endl;
  for (it = mp.begin(); it != mp.end(); it++) cout << it->first << endl;
  return 0;
}
