#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000;
string s;
int dp[maxn + 1][4];
set<string> suf;
bool caldp(int x, int y) {
  if (dp[x][y] == -1) {
    if (x == 0)
      dp[x][y] = false;
    else if (x == 1 and y == 2)
      dp[x][y] = true;
    else if (x == 1 and y == 3)
      dp[x][y] = false;
    else if (x == 2 and y == 3)
      dp[x][y] = true;
    else {
      dp[x][y] = false;
      if (y == 2) {
        dp[x][y] = (dp[x][y] or caldp(x - 2, 3));
        dp[x][y] = (dp[x][y] or (caldp(x - 2, 2) and
                                 (s[x - 2] != s[x] or s[x - 3] != s[x - 1])));
      } else {
        dp[x][y] = (dp[x][y] or caldp(x - 3, 2));
        dp[x][y] = (dp[x][y] or (caldp(x - 3, 3) and
                                 (s[x] != s[x - 3] or s[x - 1] != s[x - 4] or
                                  s[x - 2] != s[x - 5])));
      }
    }
  }
  return dp[x][y];
}
string reverse(string s) {
  string ss = "";
  for (int i = s.size() - 1; i >= 0; i--) ss = ss + s[i];
  return ss;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  s.erase(0, 5);
  s = reverse(s);
  suf.clear();
  memset(dp, -1, sizeof(dp));
  for (int i = s.size() - 1; i >= 0; i--)
    for (int j = 2; j <= 3; j++)
      if (caldp(i, j)) suf.insert(reverse(s.substr(i - j + 1, j)));
  cout << suf.size() << '\n';
  for (auto it = suf.begin(); it != suf.end(); it++) cout << (*it) << '\n';
  return 0;
}
