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