#include <bits/stdc++.h>
using namespace std;
const long long BINF = 9e8, LINF = 2e9, mod = 1e9 + 7, P = 179, Q = 1791791791;
const long long MAXN = 1e6;
long long ban[MAXN];
long long one[MAXN], two[MAXN];
void solve() {
  string s;
  cin >> s;
  for (long long i = 0; i < s.size(); ++i) one[i] = two[i] = ban[i] = 0;
  long long n = s.size(), ans = 0;
  for (long long i = 0; i + 2 < n; ++i) {
    if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e')
      ban[i] = 1, one[i] = 1, one[i + 1] = 1, one[i + 2] = 1, ++ans;
    if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o')
      ban[i] = 2, two[i] = 1, two[i + 1] = 1, two[i + 2] = 1, ++ans;
  }
  vector<long long> answ;
  for (long long i = 0; i < n; ++i)
    if (ban[i]) {
      if (two[i + 2] && one[i + 2])
        answ.push_back(i + 2);
      else if (two[i] && one[i])
        continue;
      else
        answ.push_back(i + 1);
    }
  sort(answ.begin(), answ.end());
  cout << answ.size() << "\n";
  for (long long first : answ) cout << first + 1 << " ";
  cout << "\n";
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  long long t;
  cin >> t;
  for (long long i = 0; i < t; ++i) solve();
  return 0;
}
