#include <bits/stdc++.h>
using namespace std;
const int MAX = 1.5 * 1e5;
char a[MAX] = {'0'};
int one[MAX], two[MAX];
int main() {
  int t;
  scanf("%d", &t);
  getchar();
  while (t--) {
    int len = 0, oneL = 0, twoL = 0;
    char c;
    while ((c = getchar()) != '\n') {
      a[len++] = c;
    }
    for (int i = 0; i < len - 2; i++) {
      if (a[i] == 'o' && a[i + 1] == 'n' && a[i + 2] == 'e') {
        one[oneL++] = i + 1 + 1;
        i += 2;
      } else if (a[i] == 't' && a[i + 1] == 'w' && a[i + 2] == 'o') {
        two[twoL++] = i + 1 + 1;
        i += 1;
      }
    }
    int res = oneL + twoL;
    for (int i = 0; i < twoL && two[i] < one[oneL - 1]; i++) {
      int ind = upper_bound(one, one + oneL, two[i]) - one;
      if (one[ind] - two[i] == 2) {
        res--;
        two[i] = -1;
        one[ind]--;
      }
    }
    printf("%d\n", res);
    for (int i = 0; i < twoL || i < oneL; i++) {
      if (i < twoL && two[i] != -1) printf("%d ", two[i]);
      if (i < oneL) printf("%d ", one[i]);
    }
    printf("\n");
  }
  return 0;
}
