#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    vector<int> ans;
    int n;
    string s;
    cin >> s;
    n = s.size();
    if (n <= 2) {
      cout << 0 << endl;
      continue;
    }
    s += "ZZZZZ";
    for (int i = 2; i < n; i++) {
      if (s[i] == 'e') {
        if (s[i - 2] == 'o' && s[i - 1] == 'n') ans.push_back(i);
      } else if (s[i] == 'o') {
        if (s[i - 2] == 't' && s[i - 1] == 'w') {
          if (s[i + 1] == 'o' && s[i + 2] == 'n' && s[i + 3] == 'e') {
            ans.push_back(i + 1);
            ans.push_back(i + 2);
            i += 4;
          } else if (s[i + 1] == 'n' && s[i + 2] == 'e') {
            ans.push_back(i + 1);
            i += 3;
          } else
            ans.push_back(i);
        }
      }
    }
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
