#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    vector<int> r;
    for (string t : {"twone", "one", "two"}) {
      for (size_t i = 0; (i = s.find(t, i)) != string::npos;) {
        s[i + ((int)(t).size()) / 2] = '*';
        r.push_back(i + ((int)(t).size()) / 2);
      }
    }
    cout << ((int)(r).size()) << endl;
    for (int i : r) cout << i + 1 << " ";
    cout << endl;
  }
  return 0;
}
