#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tichnas;
  cin >> tichnas;
  string twone = "twone";
  string two = "two";
  string one = "one";
  while (tichnas--) {
    string s;
    cin >> s;
    vector<int> ans;
    for (int i = 0; i < s.size(); i++) {
      for (int j = 0; j <= 5; j++) {
        if (j == 5)
          s[i + 2] = '*';
        else if (i + j == s.size() || s[i + j] != twone[j])
          break;
      }
      for (int j = 0; j <= 3; j++) {
        if (j == 3)
          s[i + 1] = '*';
        else if (i + j == s.size() || s[i + j] != two[j])
          break;
      }
      for (int j = 0; j <= 3; j++) {
        if (j == 3)
          s[i + 1] = '*';
        else if (i + j == s.size() || s[i + j] != one[j])
          break;
      }
    }
    for (int i = 0; i < s.size(); i++)
      if (s[i] == '*') ans.push_back(i + 1);
    cout << ans.size() << '\n';
    for (int i : ans) cout << i << ' ';
    cout << '\n';
  }
  return 0;
}
