#include <bits/stdc++.h>
using namespace std;
const int maxn = 150005;
int n, pos[maxn], cnt;
char s[maxn];
bool vis[maxn];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%s", s + 1);
    n = strlen(s + 1);
    for (int i = 1; i <= n; i++) vis[i] = 0;
    cnt = 0;
    for (int i = 3; i <= n - 2; i++)
      if (s[i - 2] == 't' && s[i - 1] == 'w' && s[i] == 'o' &&
          s[i + 1] == 'n' && s[i + 2] == 'e')
        vis[i] = 1, pos[++cnt] = i;
    for (int i = 2; i < n; i++)
      if (!vis[i - 1] && !vis[i] && !vis[i + 1]) {
        if (s[i - 1] == 't' && s[i] == 'w' && s[i + 1] == 'o')
          vis[i] = 1, pos[++cnt] = i;
        if (s[i - 1] == 'o' && s[i] == 'n' && s[i + 1] == 'e')
          vis[i] = 1, pos[++cnt] = i;
      }
    printf("%d\n", cnt);
    for (int i = 1; i <= cnt; i++) printf("%d ", pos[i]);
    putchar('\n');
  }
  return 0;
}
