#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 113;
string s;
set<string> st;
bool used[N][4];
int n;
int main() {
  cin >> s;
  n = s.size();
  used[n][2] = used[n][3] = 1;
  for (int i = n - 1; i > 4; i--) {
    for (int sz = 2; sz < 4; sz++) {
      for (int lastSz = 2; lastSz < 4; lastSz++) {
        if (!used[i + sz][lastSz]) continue;
        if (sz != lastSz || ((i + sz) == n)) {
          st.insert(s.substr(i, sz));
          used[i][sz] = 1;
          break;
        }
        if (s.substr(i, sz) != s.substr(i + sz, lastSz)) {
          st.insert(s.substr(i, sz));
          used[i][sz] = 1;
          break;
        }
      }
    }
  }
  cout << st.size() << endl;
  for (set<string>::iterator it = st.begin(); it != st.end(); it++) {
    cout << (*it) << endl;
  }
}
