#include <bits/stdc++.h>
using namespace std;
string s;
int len;
set<string> v;
bool check[111111][5];
void fuck(string father, int now) {
  if (now - 2 > 4) {
    string now1 = s.substr(now - 2, 2);
    if (now1 != father) {
      v.insert(now1);
      if (check[now - 2][2] == true)
        check[now - 2][2] = false, fuck(now1, now - 2);
    }
  }
  if (now - 3 > 4) {
    string now2 = s.substr(now - 3, 3);
    if (now2 != father) {
      v.insert(now2);
      if (check[now - 3][3] == true)
        check[now - 3][3] = false, fuck(now2, now - 3);
    }
  }
}
int main() {
  cin >> s;
  memset(check, true, sizeof(check));
  len = s.length();
  fuck("", len);
  cout << v.size() << endl;
  for (set<string>::iterator it = v.begin(); it != v.end(); it++)
    cout << *it << endl;
}
