#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first < b.first;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    vector<int> arr;
    string s;
    cin >> s;
    int n = s.size();
    for (int i = 0; i < n; i++) {
      if (s[i] != 'o' && s[i] != 't') continue;
      if (i + 4 < n && (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' &&
                        s[i + 3] == 'n' && s[i + 4] == 'e')) {
        arr.push_back(i + 3);
        i += 4;
      } else if (i + 2 < n && s[i] == 't' && s[i + 1] == 'w' &&
                 s[i + 2] == 'o') {
        arr.push_back(i + 2);
        i += 2;
      } else if (i + 2 < n && s[i] == 'o' && s[i + 1] == 'n' &&
                 s[i + 2] == 'e') {
        arr.push_back(i + 2);
        i += 2;
      }
    }
    cout << arr.size() << endl;
    for (auto it : arr) cout << it << " ";
    cout << endl;
  }
  return 0;
}
