#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
vector<long long> readVec(long long n) {
  vector<long long> result;
  result.resize(static_cast<std::size_t>(n));
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    result[static_cast<std::size_t>(i)] = a;
  }
  return result;
}
const long long large = numeric_limits<long long>::max();
void solve() {
  string input;
  cin >> input;
  vector<int> remove;
  for (int i = 1; i < input.size() - 1; i++) {
    if (input[i] == 'w' && input[i - 1] == 't' && input[i + 1] == 'o') {
      if (i + 3 < input.size() && input[i + 2] == 'n' && input[i + 3] == 'e') {
        input[i + 1] = 'a';
        remove.push_back(i + 1);
      } else {
        remove.push_back(i);
      }
    } else if (input[i] == 'n' && input[i - 1] == 'o' && input[i + 1] == 'e') {
      remove.push_back(i);
    }
  }
  cout << remove.size() << endl;
  for (int a : remove) {
    cout << a + 1 << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
