#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, k, n, i;
  string s;
  vector<int> v;
  cin >> t;
  while (t) {
    t--;
    cin >> s;
    v.resize(0);
    k = 0;
    for (i = 0; i < (int)s.size() - 2; i++) {
      if ((s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') ||
          (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o')) {
        v.push_back(i);
      }
    }
    for (i = 0; i < (int)v.size() - 1; i++) {
      if (v[i + 1] - v[i] == 2) {
        v[i] = -1;
        v[i + 1]--;
        k++;
      }
    }
    cout << v.size() - k << '\n';
    for (i = 0; i < (int)v.size(); i++) {
      if (v[i] + 1 > 0) cout << v[i] + 2 << " ";
    }
    cout << '\n';
  }
}
