#include <bits/stdc++.h>
using namespace std;
string s;
set<string> q;
set<string>::iterator it;
int dp[10005][3];
int main() {
  memset(dp, 0, sizeof(dp));
  cin >> s;
  q.clear();
  int la = s.size();
  for (int i = la - 1; i >= 5; i--) {
    if (i + 2 == la) {
      dp[i][0] = 1;
      q.insert(s.substr(i, 2));
      continue;
    } else if (i + 3 == la) {
      dp[i][1] = 1;
      q.insert(s.substr(i, i + 3));
      continue;
    }
    if (dp[i + 2][1] ||
        (dp[i + 2][0] && s.substr(i, 2) != s.substr(i + 2, 2))) {
      dp[i][0] = 1;
      q.insert(s.substr(i, 2));
    }
    if (dp[i + 3][0] ||
        (dp[i + 3][1] && s.substr(i, 3) != s.substr(i + 3, 3))) {
      dp[i][1] = 1;
      q.insert(s.substr(i, 3));
    }
  }
  cout << q.size() << endl;
  for (it = q.begin(); it != q.end(); it++) {
    cout << *it << endl;
  }
}
