#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    long long n = s.size();
    vector<long long> ans;
    for (long long i = 0; i < n - 2;) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        ans.push_back(i + 2);
        i += 3;
      } else if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        if (i + 3 < n && s[i + 3] == 'o')
          ans.push_back(i + 2), i += 2;
        else
          ans.push_back(i + 3), i += 3;
      } else
        i++;
    }
    cout << ans.size() << "\n";
    for (auto x : ans) cout << x << " ";
    cout << "\n";
  }
}
