#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int l = s.size(), ans = 0;
    vector<int> a;
    for (int i = 0; i < l; i++) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        ans++;
        if (i > 1) {
          if (s[i - 1] == 'w' && s[i - 2] == 't')
            a.push_back(i + 1);
          else
            a.push_back(i + 2);
        } else
          a.push_back(i + 2);
        s[i] = 'a';
        s[i + 1] = 'b';
        s[i + 2] = 'c';
        i += 2;
      }
    }
    for (int i = 0; i < l; i++) {
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        ans++;
        a.push_back(i + 2);
        i++;
      }
    }
    cout << ans << endl;
    for (auto to : a) cout << to << ' ';
    cout << endl;
  }
  return 0;
}
