#include <bits/stdc++.h>
using namespace std;
int DP[10005][2];
int main() {
  string a;
  cin >> a;
  set<string> Ans;
  DP[a.length() - 2][0] = 1;
  DP[a.length() - 2][1] = 0;
  DP[a.length() - 3][0] = 0;
  DP[a.length() - 3][1] = 1;
  if (a.length() >= 7) Ans.insert(a.substr(a.length() - 2, 2));
  if (a.length() >= 8) Ans.insert(a.substr(a.length() - 3, 3));
  a += "000";
  for (int i = a.length() - 7; i >= 5; i--) {
    if (a.substr(i, 2) != a.substr(i + 2, 2) && DP[i + 2][0] == 1) {
      DP[i][0] = 1;
      Ans.insert(a.substr(i, 2));
    } else {
      if (DP[i + 2][1] == 1) {
        DP[i][0] = 1;
        Ans.insert(a.substr(i, 2));
      }
    }
    if (a.substr(i, 3) != a.substr(i + 3, 3) && i <= a.length() - 9 &&
        DP[i + 3][1] == 1) {
      DP[i][1] = 1;
      Ans.insert(a.substr(i, 3));
    } else {
      if (DP[i + 3][0] == 1) {
        DP[i][1] = 1;
        Ans.insert(a.substr(i, 3));
      }
    }
  }
  cout << Ans.size() << endl;
  for (auto i = Ans.begin(); i != Ans.end(); i++) cout << *i << endl;
  return 0;
}
