#include <bits/stdc++.h>
using namespace std;
int t;
string s;
vector<int> sol;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> s;
    sol.clear();
    int n = s.length();
    for (int i = 0; i < n - 2; i++) {
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        if (i < n - 4 && s[i + 3] == 'n' && s[i + 4] == 'e')
          sol.push_back(i + 2);
        else
          sol.push_back(i + 1);
      }
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        if (!(2 <= i && s[i - 2] == 't' && s[i - 1] == 'w'))
          sol.push_back(i + 1);
      }
    }
    cout << sol.size() << endl;
    for (int i : sol) cout << i + 1 << " ";
    cout << endl;
  }
  return 0;
}
