#include <bits/stdc++.h>
using namespace std;
string s;
int dp[10010][4];
inline int ceq(int a, int b, int ln) {
  for (int i = 0; i < ln; i++) {
    if (s[a + i] == s[b + i]) continue;
    return 0;
  }
  return 1;
}
int cv(int a, int ln) {
  int pw = 1;
  int tt = 0;
  for (int i = ln - 1; i >= 0; i--) {
    tt += (s[a + i] - 'a' + 1) * pw;
    pw *= 27;
  }
  return tt;
}
int main(int argc, char **argv) {
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin >> s;
  set<string> sd;
  int l = s.size();
  for (int i = l - 1; i >= 5; i--) {
    if (i == l - 1) {
    } else if (i == l - 2) {
      dp[i][2] = 1;
    } else if (i == l - 3) {
      dp[i][3] = 1;
    } else {
      if (dp[i + 2][3]) dp[i][2] = 1;
      if (dp[i + 3][2]) dp[i][3] = 1;
      if (dp[i + 2][2]) {
        if (!ceq(i, i + 2, 2)) dp[i][2] = 1;
      }
      if (dp[i + 3][3]) {
        if (!ceq(i, i + 3, 3)) dp[i][3] = 1;
      }
    }
    if (dp[i][2]) {
      sd.insert(string(s, i, 2));
    }
    if (dp[i][3]) {
      sd.insert(string(s, i, 3));
    }
  }
  cout << sd.size() << endl;
  for (auto it = sd.begin(); it != sd.end(); ++it) {
    cout << *it << endl;
  }
  return 0;
}
