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