#include <bits/stdc++.h>
using namespace std;
long long mx(long long a, long long b) { return a >= b ? a : b; }
long long mn(long long a, long long b) { return a <= b ? a : b; }
string a[3] = {("twone"), ("two"), ("one")};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, x;
  cin >> t;
  while (t--) {
    string str, str2;
    long long ans = 0;
    vector<long long> v;
    cin >> str;
    if (str.size() <= 2) {
      cout << 0 << "\n"
           << "\n";
      continue;
    }
    for (long long i = 0; i < str.size() - 2; i++) {
      if (str[i] == 't' and str[i + 1] == 'w' and str[i + 2] == 'o' and
          str[i + 3] == 'n' and str[i + 4] == 'e')
        str[i + 2] = 'l', ans++, v.push_back(i + 3);
      if (str[i] == 't' and str[i + 1] == 'w' and str[i + 2] == 'o')
        ans++, str[i + 1] = 'l', v.push_back(i + 2);
      if (str[i] == 'o' and str[i + 1] == 'n' and str[i + 2] == 'e')
        ans++, str[i + 1] = 'l', v.push_back(i + 2);
    }
    cout << ans << "\n";
    for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << "\n";
  }
  return 0;
}
