#include <bits/stdc++.h>
using namespace std;
long long n, l[100006], i, j, sum, maxi;
string s;
set<string> ss;
bool b;
int can[100006][2];
int main() {
  iostream::sync_with_stdio(false);
  cin >> s;
  n = s.length();
  can[n - 1][0] = 1;
  can[n - 1][1] = 1;
  can[n - 2][1] = 1;
  s.append("$$$$$$");
  for (i = n - 2; i >= 5; i--) {
    if (i <= n - 2) {
      if (can[i + 2][1] == 0 ||
          (can[i + 2][0] == 0 && s.substr(i, 2) != s.substr(i + 2, 2))) {
        ss.insert(s.substr(i, 2));
      } else {
        can[i][0]++;
      }
    }
    if (i <= n - 3) {
      if (can[i + 3][0] == 0 ||
          (can[i + 3][1] == 0 && s.substr(i, 3) != s.substr(i + 3, 3))) {
        ss.insert(s.substr(i, 3));
      } else {
        can[i][1]++;
      }
    }
  }
  cout << ss.size() << endl;
  for (auto it = ss.begin(); it != ss.end(); it++) {
    cout << (*it) << endl;
  }
}
