#include <bits/stdc++.h>
using namespace std;
string s[10005];
int x[200005];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> s[i];
  }
  int j;
  for (int i = 0; i < N; i++) {
    int k = 0;
    int T = 0;
    memset(x, 0, sizeof(x));
    for (j = 0; j < s[i].length(); j++) {
      if (j + 2 < s[i].length() && s[i][j] == 'o' && s[i][j + 1] == 'n' &&
          s[i][j + 2] == 'e') {
        if (j - 1 >= 0 && s[i][j - 1] == 'o') {
          T++;
          x[k++] = j + 1 + 1;
        } else {
          T++;
          x[k++] = j + 1;
        }
        j = j + 2;
      } else if (j + 2 < s[i].length() && s[i][j] == 't' &&
                 s[i][j + 1] == 'w' && s[i][j + 2] == 'o') {
        if (j + 3 < s[i].length() && s[i][j + 3] == 'o') {
          T++;
          x[k++] = j + 1 + 1;
        } else {
          T++;
          x[k++] = j + 2 + 1;
        }
        j = j + 2;
      }
    }
    printf("%d\n", T);
    for (int i = 0; i < k; i++) printf("%d ", x[i]);
    printf("\n");
  }
}
