#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 10, MAXM = 2e6 + 10, INF = INT_MAX;
const int MOD = 1e9 + 7, mod = 998244353;
char s[MAXN];
char p[] = "twone";
char k[] = "two";
char z[] = "one";
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%s", s + 1);
    vector<int> ans;
    int sz = strlen(s + 1);
    for (int i = 1; i <= sz; i++) {
      if (s[i] == 'o') {
        if (i > 2 && i < sz - 1) {
          bool f = 0;
          for (int j = 0; j < 5; j++) {
            if (s[i - 2 + j] != p[j]) f = 1;
          }
          if (!f) {
            ans.push_back(i);
            continue;
          }
        }
        if (i < sz - 1) {
          bool f = 0;
          for (int j = 0; j < 3; j++)
            if (s[i + j] != z[j]) f = 1;
          if (!f) {
            ans.push_back(i + 1);
            continue;
          }
        }
        if (i > 2) {
          bool f = 0;
          for (int j = 0; j < 3; j++)
            if (s[i - 2 + j] != k[j]) f = 1;
          if (!f) {
            ans.push_back(i - 1);
            continue;
          }
        }
      }
    }
    printf("%d\n", (int)ans.size());
    for (auto j : ans) printf("%d ", j);
    puts("");
  }
  return 0;
}
