#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i = s.size();
  int count = 0;
  int lastCommand = 0;
  while (i > 0) {
    if (i == 4 && lastCommand == 1) {
      i -= 3;
      lastCommand = 3;
      count++;
      cout << i << " 3 through" << endl;
    } else {
      if (lastCommand == 1) {
        i -= 2;
        lastCommand = 2;
        count++;
        cout << i << " 2 through" << endl;
      } else {
        i -= 1;
        lastCommand = 1;
        count++;
        cout << i << " 1 through" << endl;
      }
    }
  }
  cout << count << endl;
}
