#include <bits/stdc++.h>
using namespace std;
void solve1(string s) {
  int n = s.length();
  vector<int> v;
  for (int i = 0; i < n; i++) {
    if (s[i] == 't') {
      if (i + 1 < n && s[i + 1] == 'w') {
        if (i + 2 < n && s[i + 2] == 'o') {
          if (i + 3 < n && s[i + 3] == 'n') {
            if (i + 4 < n && s[i + 4] == 'e') {
              v.push_back(i + 3);
              i += 4;
            } else {
              v.push_back(i + 2);
              i += 2;
            }
          } else {
            v.push_back(i + 2);
            i += 2;
          }
        }
      }
    } else if (s[i] == 'o') {
      if (i + 1 < n && s[i + 1] == 'n') {
        if (i + 2 < n && s[i + 2] == 'e') {
          v.push_back(i + 2);
          i += 2;
        }
      }
    }
  }
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
  cout << '\n';
}
void solve() {
  int n;
  string s;
  cin >> s;
  solve1(s);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
