#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int mod = 1e9 + 7;
const int inf = 1061109567;
const int dir[][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
set<string> s;
string str;
int vis[10005][4];
void dfs(int pos, int len) {
  if (pos < 5) return;
  vis[pos][len] = 1;
  string tmp = str.substr(pos, len);
  s.insert(tmp);
  if (str.substr(pos - len, len) != tmp) {
    if (!vis[pos - len][len]) dfs(pos - len, len);
  }
  if (len == 2) {
    if (!vis[pos - 3][3]) dfs(pos - 3, 3);
  } else {
    if (!vis[pos - 2][2]) dfs(pos - 2, 2);
  }
}
int main() {
  cin >> str;
  dfs(str.size() - 2, 2);
  dfs(str.size() - 3, 3);
  cout << s.size() << endl;
  auto it = s.begin();
  while (it != s.end()) {
    cout << (*it) << endl;
    it++;
  }
  return 0;
}
