#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
char s[N];
char t1[7] = "twone";
char t2[4] = "one";
char t3[4] = "two";
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%s", s);
    int ans = 0;
    int len = strlen(s);
    for (int i = 0; i < len; i++) {
      if (s[i] == 't') {
        int f = 0;
        for (int j = i; j <= i + 4; j++) {
          if (s[j] != t1[j - i]) {
            f = 1;
            break;
          }
        }
        if (f == 0) {
          s[i + 2] = '-';
          ans++;
        }
      }
    }
    for (int i = 0; i < len; i++) {
      if (s[i] == 't') {
        int f = 0;
        for (int j = i; j <= i + 2; j++) {
          if (s[j] != t3[j - i]) {
            f = 1;
            break;
          }
        }
        if (f == 0) {
          s[i + 1] = '-';
          ans++;
        }
      }
    }
    for (int i = 0; i < len; i++) {
      if (s[i] == 'o') {
        int f = 0;
        for (int j = i; j <= i + 2; j++) {
          if (s[j] != t2[j - i]) {
            f = 1;
            break;
          }
        }
        if (f == 0) {
          s[i + 1] = '-';
          ans++;
        }
      }
    }
    printf("%d\n", ans);
    for (int i = 0; i < len; i++)
      if (s[i] == '-') printf("%d ", i + 1);
    printf("\n");
  }
  return 0;
}
