#include <bits/stdc++.h>
using namespace std;
int lsone(int n) { return (n & -n); }
void mult(long long int a[25][25], long long int b[25][25],
          long long int c[25][25], int m, int n, int p) {
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= p; j++) {
      c[i][j] = 0;
      for (int k = 1; k <= n; k++) {
        c[i][j] += (a[i][k] * b[k][j]) % 1000000007;
        c[i][j] %= 1000000007;
      }
    }
  }
}
void mat_pow(long long int a[25][25], long long int c[25][25], int n,
             long long int p) {
  if (p == 0) {
    for (int i = 1; i <= n; i++) c[i][i] = 1;
  } else if (p == 1) {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) c[i][j] = a[i][j];
    }
  } else {
    long long int d[25][25];
    mat_pow(a, d, n, p / 2);
    if (p % 2) {
      long long int e[25][25];
      mult(d, d, e, n, n, n);
      mult(e, a, c, n, n, n);
    } else {
      mult(d, d, c, n, n, n);
    }
  }
}
long long int pow1(long long int a, long long int b) {
  if (b == 0)
    return 1ll;
  else if (b == 1)
    return a;
  else {
    long long int x = pow1(a, b / 2);
    x *= x;
    x %= 1000000007;
    if (b % 2) {
      x *= a;
      x %= 1000000007;
    }
    return x;
  }
}
map<string, int> m1;
string s;
int ans = 0, pos[4][11000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> s;
  int len1 = 2;
  int n = s.size();
  if (n <= 6) {
    cout << 0 << "\n";
    return 0;
  }
  pos[2][n - 1] = pos[3][n - 1] = 0;
  pos[2][n] = 1;
  pos[2][n - 2] = 1;
  ans = 1;
  m1[s.substr(n - 2, 2)] = 1;
  for (int i = s.size() - 3; i > 4; i--) {
    string t1 = s.substr(i, 2);
    string t2 = s.substr(i, 3);
    if (pos[2][i + 2] or pos[3][i + 2]) {
      int f = 1;
      if (pos[2][i + 2] and !pos[3][i + 2]) {
        string t3 = s.substr(i + 2, 2);
        if (t3 == t1) f = 0;
      }
      if (f) {
        pos[2][i] = 1;
        if (m1.count(t1) < 1) {
          m1[t1] = 1;
          ans++;
        }
      } else
        pos[2][i] = 0;
    }
    if (pos[2][i + 3] or pos[3][i + 3]) {
      int f = 1;
      if (pos[3][i + 3] and !pos[2][i + 3]) {
        string t3 = s.substr(i + 3, 3);
        if (t3 == t2) f = 0;
      }
      if (f) {
        pos[3][i] = 1;
        if (m1.count(t2) < 1) {
          m1[t2] = 1;
          ans++;
        }
      } else
        pos[3][i] = 0;
    }
  }
  cout << ans << "\n";
  for (auto elem : m1) {
    cout << elem.first << "\n";
  }
  return 0;
}
