#include <bits/stdc++.h>
using namespace std;
set<string> c;
string total;
char pal[100005];
bool valid2[100005], valid3[100005];
int main() {
  scanf("%s", pal);
  total = pal;
  int n = total.size();
  valid2[n] = true;
  valid3[n] = true;
  for (int i = n - 2; i > 4; i--) {
    if (valid3[i + 2]) {
      c.insert(total.substr(i, 2));
      valid2[i] = true;
    } else if (valid2[i + 2]) {
      if (total.substr(i, 2) != total.substr(i + 2, 2)) {
        c.insert(total.substr(i, 2));
        valid2[i] = true;
      }
    }
    if (valid2[i + 3]) {
      c.insert(total.substr(i, 3));
      valid3[i] = true;
    } else if (valid3[i + 3]) {
      if (total.substr(i, 3) != total.substr(i + 3, 3)) {
        c.insert(total.substr(i, 3));
        valid3[i] = true;
      }
    }
  }
  printf("%d\n", (int)c.size());
  for (set<string>::iterator it = c.begin(); it != c.end(); it++) {
    printf("%s\n", (string(*it)).c_str());
  }
  return 0;
}
