#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int f = 1, r = 0;
  char ch = getchar();
  while (ch < 48) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch > 47) r = r * 10 + (ch ^ 48), ch = getchar();
  return r * f;
}
inline int max(int x, int y) { return x > y ? x : y; }
inline int min(int x, int y) { return x > y ? y : x; }
inline int gcd(int a, int b) {
  while (b) {
    int t = a % b;
    a = b, b = t;
  }
  return a;
}
const int maxn = 1000086;
int m, n;
char s[maxn];
char b[maxn];
int w[maxn];
int out[maxn], ans;
void mian() {
  scanf("%s", s + 1), n = strlen(s + 1), ans = 0;
  for (int i = n; i >= 2;) {
    if (s[i] == 'e' && s[i - 1] == 'n' && s[i - 2] == 'o') {
      if (i >= 5 && s[i - 3] == 'w' && s[i - 4] == 't')
        out[++ans] = i - 2, i -= 3;
      else
        out[++ans] = i - 1, i -= 2;
    } else if (s[i] == 'o' && s[i - 1] == 'w' && s[i - 2] == 't')
      out[++ans] = i - 1, i -= 2;
    else
      --i;
  }
  printf("%d\n", ans);
  for (int i = 1; i <= ans; ++i) printf("%d ", out[i]);
}
signed main() {
  int T = read();
  while (T--) mian();
  return 0;
}
