#include <bits/stdc++.h>
using namespace std;
long long int __xor(long long int a, long long int b) { return a ^ b; }
long long int __and(long long int a, long long int b) { return a & b; }
long long int __or(long long int a, long long int b) { return a | b; }
long long int ai[1000], pi[1000];
int main() {
  long long int b, c, x, y, z, t, i, j, k, l1, l2, m, n, c1 = 0, c2 = 0, q;
  scanf("%lld", &t);
  string str;
  while (t--) {
    cin >> str;
    vector<long long int> vec;
    if (str.length() >= 5) {
      for (j = 0; j <= str.length() - 5; j++) {
        if (str[j] == 't' && str[j + 1] == 'w' && str[j + 2] == 'o' &&
            str[j + 3] == 'n' && str[j + 4] == 'e') {
          str[j + 2] = '1';
          vec.push_back(j + 2 + 1);
        }
      }
    }
    if (str.length() >= 3) {
      for (j = 0; j <= str.length() - 3; j++) {
        if (str[j] == 'o' && str[j + 1] == 'n' && str[j + 2] == 'e') {
          vec.push_back(j + 1 + 1);
        }
      }
      for (j = 0; j <= str.length() - 3; j++) {
        if (str[j] == 't' && str[j + 1] == 'w' && str[j + 2] == 'o') {
          vec.push_back(j + 1 + 1);
        }
      }
    }
    cout << vec.size() << "\n";
    for (j = 0; j < vec.size(); j++) cout << vec[j] << " ";
    cout << "\n";
  }
  return 0;
}
