#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  vector<long long> a;
  long long r = 0, b = 0;
  while (true) {
    size_t ind = s.find("twone", b);
    if (ind != string::npos) {
      s[ind + 2] = 'a';
      b = ind + 5;
      ++r;
      a.push_back(ind + 3);
    } else
      break;
  }
  b = 0;
  while (true) {
    size_t ind = s.find("two", b);
    if (ind != string::npos) {
      s[ind + 1] = 'a';
      b = ind + 3;
      ++r;
      a.push_back(ind + 2);
    } else
      break;
  }
  b = 0;
  while (true) {
    size_t ind = s.find("one", b);
    if (ind != string::npos) {
      s[ind + 2] = 'a';
      b = ind + 3;
      ++r;
      a.push_back(ind + 2);
    } else
      break;
  }
  cout << r << endl;
  for (long long d = 0; d < a.size(); ++d) {
    cout << a[d] << ' ';
  }
  cout << endl;
  ;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
}
