#include <bits/stdc++.h>
using namespace std;
const int maxn = 15e4 + 5;
int ans[maxn];
int main() {
  int T;
  cin >> T;
  while (T--) {
    string s;
    cin >> s;
    int p = 0, n = s.length();
    for (int i = 0; i < n; i++) {
      if (i + 5 <= n && s.substr(i, 5) == "twone") {
        ans[++p] = i + 2;
        i += 4;
      } else if (i + 3 <= n && s.substr(i, 3) == "one") {
        ans[++p] = i + 1;
        i += 2;
      } else if (i + 3 <= n && s.substr(i, 3) == "two") {
        ans[++p] = i + 1;
        i += 2;
      }
    }
    cout << p << endl;
    for (int i = 1; i <= p; i++) cout << ans[i] + 1 << ' ';
    cout << endl;
  }
}
