#include <bits/stdc++.h>
using namespace std;
string tar;
queue<int> q;
set<string> ans;
bool vis[60000][5] = {false}, check[60000] = {false};
int main() {
  cin >> tar;
  int len = tar.length();
  vis[len][3] = true;
  vis[len][2] = true;
  q.push(len - 2);
  q.push(len - 3);
  while (!q.empty()) {
    int pos = q.front();
    q.pop();
    if (pos >= 5 && (vis[pos + 2][2] == true || vis[pos + 2][3] == true)) {
      if (pos + 2 == len) {
        vis[pos][2] = true;
        string s = tar.substr(pos, 2);
        ans.insert(s);
      } else {
        if (vis[pos + 2][2] == true) {
          string s = tar.substr(pos, 2), t = tar.substr(pos + 2, 2);
          if (s != t) {
            vis[pos][2] = true;
            ans.insert(s);
          }
        }
        if (vis[pos + 2][3] == true) {
          string s = tar.substr(pos, 2);
          vis[pos][2] = true;
          ans.insert(s);
        }
      }
    }
    if (pos >= 5 && (vis[pos + 3][2] == true || vis[pos + 3][3] == true)) {
      if (pos + 3 == len) {
        vis[pos][3] = true;
        string s = tar.substr(pos, 3);
        ans.insert(s);
      } else {
        if (vis[pos + 3][3] == true) {
          string s = tar.substr(pos, 3), t = tar.substr(pos + 3, 3);
          if (s != t) {
            vis[pos][3] = true;
            ans.insert(s);
          }
        }
        if (vis[pos + 3][2] == true) {
          string s = tar.substr(pos, 3);
          vis[pos][3] = true;
          ans.insert(s);
        }
      }
    }
    if (pos - 2 >= 5 && check[pos - 2] == false) {
      check[pos - 2] = true;
      q.push(pos - 2);
    }
    if (pos - 3 >= 5 && check[pos - 3] == false) {
      check[pos - 3] = true;
      q.push(pos - 3);
    }
  }
  printf("%d\n", ans.size());
  for (set<string>::iterator iter = ans.begin(); iter != ans.end(); iter++) {
    printf("%s\n", iter->c_str());
  }
  return 0;
}
