#include <bits/stdc++.h>
using namespace std;
long long int dx[] = {0, 1, 0, -1, -1, 1, -1, 1};
long long int dy[] = {-1, 0, 1, 0, -1, 1, 1, -1};
const long long int MAXN = 1e3 + 5;
const long long int N = 2e5 + 5;
long long int n, m, k;
void solve() {
  long long int x, y;
  string s;
  cin >> s;
  n = s.size();
  vector<long long int> res;
  for (string pattern : {"twone", "one", "two"}) {
    m = pattern.size();
    for (long long int i = 0; i <= n - m; i++) {
      string temp = s.substr(i, m);
      if (temp == pattern) {
        s[i + (m / 2)] = '#';
        res.push_back(i + (m / 2));
      }
    }
  }
  cout << res.size() << "\n";
  for (long long int i : res) cout << i + 1 << " ";
  cout << "\n";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  cin >> T;
  while (T--) solve();
  return 0;
}
