#include <bits/stdc++.h>
using namespace std;
map<string, int> Book;
int book[10005][5] = {0};
set<string> ans;
string a;
void dfs(int s, int l, string m);
int main() {
  int i, l, j;
  set<string>::iterator it;
  cin >> a;
  for (l = 2; l <= 3; l++) {
    dfs(a.size() - 1, l, string());
  }
  l = ans.size();
  cout << l << endl;
  for (it = ans.begin(); it != ans.end(); it++) {
    cout << *it << endl;
  }
}
void dfs(int s, int l, string m) {
  int i, left = s - (l - 1);
  string t;
  if (left <= 4 || book[s][l]) {
    return;
  }
  book[s][l] = 1;
  t.clear();
  for (i = left; i <= s; i++) {
    t += a[i];
  }
  if (t == m) {
    book[s][l] = 0;
    return;
  }
  ans.insert(t);
  dfs(s - l, 2, t);
  dfs(s - l, 3, t);
}
