#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int _;
  cin >> _;
  while (_--) {
    string a;
    cin >> a;
    long long int i = 0;
    long long int n = a.size();
    vector<long long int> ans;
    for (i = 0; i < n - 4; i++) {
      if ((a[i] == 't') && (a[i + 1] == 'w') && (a[i + 2] == 'o') &&
          (a[i + 3] == 'n') && (a[i + 4] == 'e')) {
        ans.push_back(i + 2);
        a[i + 2] = 'z';
      }
    }
    for (i = 0; i < n - 2; i++) {
      if (((a[i] == 't') && (a[i + 1] == 'w') && (a[i + 2] == 'o')) ||
          ((a[i] == 'o') && (a[i + 1] == 'n') && (a[i + 2] == 'e'))) {
        ans.push_back(i + 1);
      }
    }
    cout << ans.size() << "\n";
    for (i = 0; i < ans.size(); i++) {
      cout << ans[i] + 1 << " ";
    }
    cout << "\n";
  }
}
