#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  std::cin >> t;
  while (t--) {
    string str;
    std::cin >> str;
    long long int ans = 0;
    std::vector<long long int> index;
    long long int n = str.length();
    for (int i = 0; i < str.length(); i++) {
      if (str[i] != 'o' && str[i] != 't') continue;
      if (i + 1 < n && i + 2 < n && str[i] == 'o' && str[i + 1] == 'n' &&
          str[i + 2] == 'e') {
        ans++;
        index.push_back(i + 1);
        i = i + 2;
      } else if (i + 1 < n && i + 2 < n && str[i] == 't' && str[i + 1] == 'w' &&
                 str[i + 2] == 'o') {
        if (i + 3 < n && str[i + 3] == 'n' && i + 4 < n && str[i + 4] == 'e') {
          ans++;
          index.push_back(i + 2);
          i = i + 4;
        } else {
          ans++;
          index.push_back(i + 1);
          i = i + 2;
        }
      }
    }
    std::cout << ans << std::endl;
    for (int i = 0; i < index.size(); i++) cout << index[i] + 1 << " ";
    cout << "\n";
  }
  return 0;
}
