#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int n = s.size(), ans = 0;
    vector<int> p;
    for (int i = 0; i < n - 2; i++) {
      string second = s.substr(i, 3);
      if (second == "one") {
        p.push_back(i + 1);
        i += 2;
        ans++;
      } else if (second == "two") {
        if (i + 3 < n && s[i + 3] == 'o')
          p.push_back(i + 1);
        else
          p.push_back(i + 2);
        i += 2;
        ans++;
      }
    }
    cout << ans << endl;
    for (int i = 0; i < p.size(); i++) {
      cout << p[i] + 1 << " ";
    }
    cout << endl;
  }
}
