#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
char s[maxn];
int dp[maxn];
int main() {
  int t, n;
  scanf("%d", &t);
  vector<int> v;
  while (t--) {
    v.clear();
    scanf("%s", s + 1);
    n = strlen(s + 1);
    for (int i = 1; i <= n - 2; i++) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        v.push_back(i + 1);
        i += 2;
      }
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        if (i <= n - 4 && s[i + 3] == 'n' && s[i + 4] == 'e') {
          v.push_back(i + 2);
          i += 4;
        } else {
          v.push_back(i + 1);
          i += 1;
        }
      }
    }
    printf("%d\n", (int)v.size());
    for (auto x : v) printf("%d ", x);
    printf("\n");
  }
  return 0;
}
