#include <bits/stdc++.h>
using namespace std;
int n;
vector<char> veq;
void getVeq() {
  string s;
  cin >> s;
  veq.clear();
  n = s.length();
  veq.push_back('x');
  veq.push_back('x');
  for (int i = 0; i < s.length(); i++) veq.push_back(s[i]);
  veq.push_back('x');
  veq.push_back('x');
}
vector<int> ind;
void getRes() {
  char a, b, curr, c, d;
  ind.clear();
  a = veq[0];
  b = veq[1];
  curr = veq[2];
  c = veq[3];
  d = veq[4];
  for (int i = 2; i <= n + 1; i++) {
    curr = veq[i];
    c = veq[i + 1];
    d = veq[i + 2];
    if (curr == 'e' && b == 'n' && a == 'o') {
      ind.push_back(i - 2);
      b = 'e';
    } else if (curr == 'o' && b == 'w' && a == 't') {
      if (c == 'n' && d == 'e') {
        ind.push_back(i - 1);
      } else {
        ind.push_back(i - 2);
        b = 'o';
      }
    } else {
      a = b;
      b = curr;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    getVeq();
    getRes();
    cout << ind.size() << '\n';
    for (int i = 0; i < ind.size(); i++) cout << ind[i] << ' ';
    cout << '\n';
  }
  return 0;
}
