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