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