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