#include <bits/stdc++.h>
using namespace std;
string f;
const int N = 2e5 + 5;
int n, m, len, cs = 1, tc;
void brain_fry() {
  for (cin >> tc; tc--;) {
    vector<int> ans;
    cin >> f;
    len = f.size();
    for (int i = 0; i + 2 < len; ++i) {
      if (i + 4 < len && f.substr(i, 5) == "twone") {
        ans.push_back(i + 3);
        f[i + 2] = 'z';
      } else if (f[i] == 't' && f[i + 1] == 'w' && f[i + 2] == 'o') {
        f[i + 1] = 'z';
        ans.push_back(i + 2);
      } else if (f[i] == 'o' && f[i + 1] == 'n' && f[i + 2] == 'e') {
        f[i + 1] = 'z';
        ans.push_back(i + 2);
      }
    }
    cout << ans.size() << endl;
    for (auto t : ans) cout << t << " ";
    cout << endl;
  }
}
void optionalTask() {
  string f = "ashrafulislam";
  cout << f.substr(2, 5) << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  brain_fry();
  return 0;
}
