#include <bits/stdc++.h>
using namespace std;
long long fact(long long n) {
  long long ans = 1;
  for (long long i = 1; i <= n; i++) {
    ans = ans * i;
  }
  return ans;
}
long long ncr(long long n, long long r) {
  return fact(n) / (fact(r) * fact(n - r));
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool isSorted(long long b, long long e, vector<long long> v) {
  long long count = 1;
  for (long long i = b; i < e - 1; i++) {
    if (v[i] <= v[i + 1]) count++;
  }
  if (count == e - b) return true;
  return false;
}
void solve() {
  string s;
  cin >> s;
  long long ans = 0;
  long long n = s.size();
  for (long long i = 0; i < s.size(); i++) {
    if (i < n - 4 && s.substr(i, 5) == "twone") {
      s[i + 2] = '!';
      ans++;
    }
    if (i < n - 2 && s.substr(i, 3) == "one") {
      s[i + 1] = '!';
      ans++;
    }
    if (i < n - 2 && s.substr(i, 3) == "two") {
      s[i + 1] = '!';
      ans++;
    }
  }
  cout << ans << "\n";
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '!') cout << i + 1 << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  long long t;
  t = 1;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
