#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    string s;
    stack<int> a;
    cin >> s;
    for (long long j = 0; j < s.size(); j++) {
      if (j < s.size() - 2 && j > 1 && s[j] == 'o' && s[j + 1] == 'n' &&
          s[j + 2] == 'e' && s[j - 2] == 't' && s[j - 1] == 'w') {
        a.pop();
        a.push(j);
        j++;
      } else if (j < s.size() - 1 && j > 0 && s[j] == 'n' && s[j - 1] == 'o' &&
                 s[j + 1] == 'e') {
        a.push(j);
      } else if (j < s.size() - 1 && j > 0 && s[j] == 'w' && s[j - 1] == 't' &&
                 s[j + 1] == 'o') {
        a.push(j);
      }
    }
    cout << a.size() << endl;
    while (!a.empty()) {
      cout << a.top() + 1 << ' ';
      a.pop();
    }
    cout << endl;
  }
  return 0;
}
