#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1e6 + 10;
int sumo = 0, sumn = 0, sume = 0, sumt = 0, sumw = 0;
char s[maxn];
int tot[maxn];
int main() {
  int t;
  scanf("%d", &t);
  tot[0] = -5;
  while (t--) {
    scanf("%s", s);
    int len = strlen(s), tot2 = 1;
    sumo = 0, sumn = 0, sume = 0, sumt = 0, sumw = 0;
    long long ans = 0;
    for (int i = 2; i < len; i++) {
      if (s[i] == 'o' && s[i - 1] == 'w' && s[i - 2] == 't') {
        if (i + 1 < len && s[i + 1] == 'o')
          tot[tot2++] = i;
        else
          tot[tot2++] = i + 1;
      }
      if (s[i] == 'e' && s[i - 1] == 'n' && s[i - 2] == 'o') {
        if (tot[tot2 - 1] == i - 1)
          continue;
        else
          tot[tot2++] = i;
      }
    }
    printf("%d\n", tot2 - 1);
    for (int i = 1; i < tot2; i++) printf("%d ", tot[i]);
    printf("\n");
  }
  return 0;
}
