#include <bits/stdc++.h>
using namespace std;
const int N = 1000010, M = 200010, mod = 998244353;
long long qmi(long long, long long);
long long read();
long long gcd(long long, long long);
int n, p, k;
char s[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    scanf("%s", s + 1);
    vector<int> res;
    n = strlen(s + 1);
    for (int i = 1; i + 2 <= n; i++) {
      if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
        res.push_back(i + 1);
        s[i + 1] = '?';
      } else if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
        if (i + 4 <= n && s[i + 3] == 'n' && s[i + 4] == 'e') {
          res.push_back(i + 2);
          s[i + 2] = '?';
        } else {
          res.push_back(i + 1);
          s[i + 1] = '?';
        }
      }
    }
    cout << res.size() << '\n';
    for (int x : res) cout << x << " ";
    puts("");
  }
  return 0;
}
long long qmi(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
