#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
const double pi = acos(-1);
const int mod = 1e9 + 7;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int T;
char s[N];
vector<int> vec;
void solve() {
  scanf("%s", s + 1);
  vec.clear();
  int len = strlen(s + 1);
  int st = 0;
  int res = 0;
  for (int i = 1; i <= len;) {
    if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
      st = 0;
      res++;
      vec.push_back(i + 1);
      i = i + 3;
      continue;
    }
    if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' && s[i + 3] == 'n' &&
        s[i + 4] == 'e') {
      vec.push_back(i + 2);
      i = i + 5;
      st = 0;
      res++;
      continue;
    }
    if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
      vec.push_back(i + 1);
      st = 1;
      i = i + 3;
      res++;
      continue;
    }
    i++;
  }
  cout << res << "\n";
  for (int i = 0; i < vec.size(); i++) cout << vec[i] << " ";
  cout << "\n";
}
int main() {
  T = read();
  for (int i = 1; i <= T; i++) {
    solve();
  }
}
