#include <bits/stdc++.h>
using namespace std;
long long M = 1000000007;
signed main() {
  long long t;
  cin >> t;
  for (long long u = 0; u < t; u++) {
    long long k = 0;
    vector<long long> v;
    string s;
    cin >> s;
    for (long long i = 0; i < s.size(); i++) {
      if (i + 4 < s.size() &&
          (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' &&
           s[i + 3] == 'n' && s[i + 4] == 'e')) {
        v.push_back(i + 3);
        i += 4;
      } else if (i + 2 < s.size()) {
        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 + 2);
          i += 2;
        }
      }
    }
    cout << v.size() << endl;
    for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
  }
}
