#include <bits/stdc++.h>
using namespace std;
char a[200010];
int stk[1000010];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%s", a + 1);
    int ans = 0;
    n = strlen(a + 1);
    for (int i = n + 1; i <= n + 10; i++) a[i] = ' ';
    int cnt = 0;
    int tp = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] == 't' && a[i + 1] == 'w' && a[i + 2] == 'o') {
        if (a[i + 3] == 'n' && a[i + 4] == 'e')
          ans++, stk[++tp] = i + 2, i = i + 4;
        else {
          stk[++tp] = i + 1;
          ans++;
          i = i + 2;
        }
      }
      if (a[i] == 'o' && a[i + 1] == 'n' && a[i + 2] == 'e') {
        stk[++tp] = i + 1;
        ans++;
        i = i + 2;
      }
    }
    printf("%d\n", ans);
    for (int i = 1; i <= tp; i++) printf("%d ", stk[i]);
    printf("\n");
  }
}
