#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  set<long long int> ss;
  vector<long long int> a(s.length(), 1);
  for (int i = 0; i < s.length() - 4 && s.length() > 4; i++) {
    if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' && s[i + 3] == 'n' &&
        s[i + 4] == 'e') {
      ss.insert(i + 3);
      a[i] = 0;
      a[i + 1] = 0;
      a[i + 2] = 0;
      a[i + 3] = 0;
      a[i + 4] = 0;
    }
  }
  for (int i = 0; i < s.length() - 2 && s.length() > 2; i++) {
    if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e' && a[i])
      ss.insert(i + 2);
    else if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' && a[i])
      ss.insert(i + 2);
  }
  cout << ss.size() << endl;
  for (auto i = ss.begin(); i != ss.end(); i++) cout << *i << " ";
  cout << endl;
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
