#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = (int)2e5 + 3;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int T;
  cin >> T;
  while (T--) {
    string s;
    cin >> s;
    int n = s.size();
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      if (s[i] == 't') {
        if (i + 2 < n) {
          if (s[i + 1] == 'w' && s[i + 2] == 'o') {
            if (i + 4 < n) {
              if (s[i + 3] == 'n' && s[i + 4] == 'e') {
                ans.push_back(i + 2 + 1);
                i = i + 4;
              } else {
                ans.push_back(i + 1 + 1);
                i = i + 2;
              }
            } else {
              ans.push_back(i + 1 + 1);
              i = i + 2;
            }
          }
        }
      } else if (s[i] == 'o') {
        if (i + 2 < n) {
          if (s[i + 1] == 'n' && s[i + 2] == 'e') {
            ans.push_back(i + 1 + 1);
            i = i + 2;
          }
        }
      }
    }
    cout << ans.size() << "\n";
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << "\n";
  }
  return 0;
}
