#include <bits/stdc++.h>
using namespace std;
string s;
set<string> S;
bool dp2[10005], dp3[10005], dp[10005];
int main() {
  cin >> s;
  dp[s.size()] = 1;
  dp[s.size() - 1] = 0;
  for (int i = s.size() - 2; i >= 0; i--) {
    int x = s.size() - i;
    if (x >= 2) {
      char a = s[i], b = s[i + 1];
      if (i + 3 >= s.size()) {
        dp2[i] |= dp[i + 2];
      } else if (a != s[i + 2] || b != s[i + 3]) {
        dp2[i] |= dp[i + 2];
      } else {
        dp2[i] |= dp3[i + 2];
      }
    }
    if (x >= 3) {
      char a = s[i], b = s[i + 1], c = s[i + 2];
      if (i + 5 >= s.size()) {
        dp3[i] |= dp[i + 3];
      } else if (a != s[i + 3] || b != s[i + 4] || c != s[i + 5]) {
        dp3[i] |= dp[i + 3];
      } else {
        dp3[i] |= dp2[i + 3];
      }
    }
    dp[i] |= dp2[i];
    dp[i] |= dp3[i];
  }
  for (int i = s.size() - 1; i >= 5; i--) {
    {
      if (dp2[i]) {
        string q = "";
        for (int x = i; x < i + 2; x++) q.push_back(s[x]);
        S.insert(q);
      }
      if (dp3[i]) {
        string q = "";
        for (int x = i; x < i + 3; x++) q.push_back(s[x]);
        S.insert(q);
      }
    }
  }
  cout << S.size() << endl;
  for (set<string>::iterator it = S.begin(); it != S.end(); ++it) {
    cout << *it << endl;
  }
}
