#include <bits/stdc++.h>
using namespace std;
string s;
string one = "one";
string two = "two";
bool is_word(int i) {
  if (s.size() <= i + 2) return false;
  if (s[i] == one[0] && s[i + 1] == one[1] && s[i + 2] == one[2]) {
    return true;
  } else if (s[i] == two[0] && s[i + 1] == two[1] && s[i + 2] == two[2]) {
    return true;
  }
  return false;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> s;
    int count = 0;
    vector<int> positions;
    bool first = true;
    for (int i = 0; i < int(s.size()) - 2; i++) {
      if (is_word(i)) {
        count++;
        if (s.size() >= i + 3 && s[i + 3] == s[i + 2]) {
          positions.push_back(i + 1);
        } else {
          positions.push_back(i + 2);
        }
        i += 2;
      }
    }
    cout << count << endl;
    first = true;
    for (int i = 0; i < positions.size(); i++) {
      if (first)
        first = false;
      else
        cout << " ";
      cout << positions[i] + 1;
    }
    cout << endl;
  }
  return 0;
}
