#include <bits/stdc++.h>
using namespace std;
int binarySearch(int arr[], int l, int r, int x) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m] == x) return m;
    if (arr[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
bool isprime(int n) {
  if (n <= 1) return false;
  for (int i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
long long int factorial(int n) {
  if (n == 0) return 1;
  return n * factorial(n - 1);
}
int countDigit(long long n) {
  int count = 0;
  while (n != 0) {
    n = n / 10;
    ++count;
  }
  return count;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int c = 0;
    string s;
    cin >> s;
    if (s.length() <= 2) {
      cout << "0\n\n";
      continue;
    }
    vector<int> v;
    for (int i = 0; i < s.length() - 2; i++) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        c++;
        v.push_back(i + 2);
        s[i + 1] = '.';
      } else if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        c++;
        if (i < s.length() - 4) {
          if (s[i + 3] == 'n' && s[i + 4] == 'e') {
            v.push_back(i + 3);
            s[i + 2] = '.';
          } else {
            v.push_back(i + 2);
            s[i + 1] = '.';
          }
        } else {
          v.push_back(i + 2);
          s[i + 1] = '.';
        }
      }
    }
    if (c != 0) {
      cout << c << "\n";
      for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
      cout << "\n";
    } else
      cout << "0\n\n";
  }
  return 0;
}
