#include <bits/stdc++.h>
using namespace std;
string m;
set<string> myset;
set<string>::iterator iter;
vector<string> mic[10005];
int main() {
  cin >> m;
  int x = m.size();
  if (x <= 6) {
    cout << 0;
    return 0;
  }
  if (x > 6) {
    mic[x - 2].push_back(m.substr(x - 2, 2));
    myset.insert(m.substr(x - 2, 2));
  }
  if (x > 7) {
    mic[x - 3].push_back(m.substr(x - 3, 3));
    myset.insert(m.substr(x - 3, 3));
  }
  for (int i = x - 4; i > 4; i--) {
    if (mic[i + 2].size() == 2) {
      mic[i].push_back(m.substr(i, 2));
      myset.insert(m.substr(i, 2));
    } else if (mic[i + 2].size() == 1 && m.substr(i, 2) != mic[i + 2][0]) {
      mic[i].push_back(m.substr(i, 2));
      myset.insert(m.substr(i, 2));
    }
    if (mic[i + 3].size() == 2) {
      mic[i].push_back(m.substr(i, 3));
      myset.insert(m.substr(i, 3));
    } else if (mic[i + 3].size() == 1 && m.substr(i, 3) != mic[i + 3][0]) {
      mic[i].push_back(m.substr(i, 3));
      myset.insert(m.substr(i, 3));
    }
  }
  cout << myset.size() << endl;
  for (iter = myset.begin(); iter != myset.end(); iter++)
    cout << *(iter) << endl;
  return 0;
}
