#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
bool compare(T x, U y) {
  return (abs(x - y) <= 1e-9);
}
const int MOD = 1e9 + 7;
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = (int)s.size();
  vector<int> ok(n, 1);
  for (int i = 0; i < n - 4; i++)
    if (s.substr(i, 5) == "twone") {
      ok[i + 2] = 0;
      s[i + 2] = '#';
    }
  for (int i = 0; i < n - 2; i++)
    if (s.substr(i, 3) == "two" || s.substr(i, 3) == "one") ok[i + 1] = 0;
  cout << count(ok.begin(), ok.end(), 0) << "\n";
  for (int i = 0; i < n; i++)
    if (!ok[i]) cout << i + 1 << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
}
