#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
void solve() {
  string s;
  cin >> s;
  int len = s.length();
  set<int> res;
  if (len >= 3)
    for (int i = 0; i < len - 3 + 1; ++i) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        if (i - 1 >= 0 && s[i - 1] != 'o')
          res.insert(i);
        else
          res.insert(i + 1);
      }
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        if (i + 3 < len && s[i + 3] != 'o')
          res.insert(i + 2);
        else
          res.insert(i + 1);
      }
    }
  cout << res.size() << "\n";
  for (auto it : res) {
    cout << it + 1 << " ";
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
