#include <bits/stdc++.h>
using namespace std;
string s, tmp1, tmp2;
int len, ans, n;
bool dp[10005][2];
set<string> Set;
int main() {
  while (cin >> s) {
    n = s.length();
    ans = 0;
    memset(dp, false, sizeof(dp));
    dp[n - 2][0] = true;
    dp[n - 3][1] = true;
    for (int i = n - 3; i >= 5; --i) {
      if (i + 2 <= n) {
        tmp1 = s.substr(i, 2);
        if (!dp[i][0] && dp[i + 2][0]) {
          tmp2 = s.substr(i + 2, 2);
          if (!(tmp1 == tmp2)) dp[i][0] = true;
        }
        if (!dp[i][0] && dp[i + 2][1]) {
          tmp2 = s.substr(i + 2, 3);
          if (!(tmp1 == tmp2)) dp[i][0] = true;
        }
      }
      if (i + 3 <= n) {
        tmp1 = s.substr(i, 3);
        if (!dp[i][1] && dp[i + 3][0]) {
          tmp2 = s.substr(i + 3, 2);
          if (!(tmp1 == tmp2)) dp[i][1] = true;
        }
        if (!dp[i][1] && dp[i + 3][1]) {
          tmp2 = s.substr(i + 3, 3);
          if (!(tmp1 == tmp2)) dp[i][1] = true;
        }
      }
    }
    Set.clear();
    for (int i = 5; i < n - 1; ++i) {
      if (dp[i][0]) Set.insert(s.substr(i, 2));
      if (dp[i][1]) Set.insert(s.substr(i, 3));
    }
    cout << Set.size() << endl;
    for (set<string>::iterator it = Set.begin(); it != Set.end(); ++it)
      cout << *it << endl;
  }
  return 0;
}
