#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
char s[maxn];
int n, dp[maxn][2];
string temp;
set<string> se;
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  dp[n + 1][0] = dp[n + 1][1] = 1;
  for (int ed = n; ed >= 5; ed--) {
    for (int st = ed - 1; st >= ed - 2; st--) {
      if (st <= 5) break;
      temp = "";
      int len = ed - st + 1;
      if ((dp[ed + 1][len & 1] | dp[ed + 1][!(len & 1)]) == 0) continue;
      for (int i = st; i <= ed; i++) temp += s[i];
      string t = "";
      for (int i = ed + 1; i <= ed + len; i++) t += s[i];
      if (temp == t && dp[ed + 1][!(len & 1)] == 0) continue;
      se.insert(temp);
      dp[st][len & 1] = 1;
    }
  }
  printf("%d\n", se.size());
  for (auto it : se) cout << it << '\n';
  return 0;
}
