#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int n = s.size();
    vector<int> v;
    int i = 0;
    while (i <= n - 3) {
      string str;
      int f = 0;
      if (i + 4 < n) {
        str = s.substr(i, 5);
        if (str == "twone") {
          v.push_back(i + 2);
          f++;
          i = i + 5;
        }
      }
      if (i + 2 < n && f == 0) {
        str = s.substr(i, 3);
        if (str == "one") {
          v.push_back(i + 1);
          i += 3;
        } else if (str == "two") {
          v.push_back(i + 1);
          i += 3;
        } else
          i++;
      }
    }
    cout << v.size() << endl;
    for (auto it : v) cout << it + 1 << " ";
    cout << endl;
  }
}
