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