#include <bits/stdc++.h>
using namespace std;
signed main() {
  {
    if (fopen("input.txt", "r")) {
      freopen("input.txt", "r", stdin);
      freopen("output.txt", "w", stdout);
    }
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  }
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    string::size_type pos = 0;
    vector<int> ans;
    ans.reserve(s.size());
    while ((pos = s.find("twone", pos)) != string::npos) {
      ans.push_back(pos + 2);
      s[pos + 2] = 'X';
    }
    pos = 0;
    while ((pos = s.find("two", pos)) != string::npos) {
      ans.push_back(pos + 1);
      s[pos + 1] = 'X';
    }
    pos = 0;
    while ((pos = s.find("one", pos)) != string::npos) {
      ans.push_back(pos + 1);
      s[pos + 1] = 'X';
    }
    cout << ans.size() << '\n';
    for (auto i : ans) cout << i + 1 << ' ';
    cout << '\n';
  }
  return 0;
}
