#include <bits/stdc++.h>
using namespace std;
double pie = 3.14159265358979323846;
bool isPowerOfTwo(long long int n) {
  if (n == 0) return false;
  return (ceill(log2l(n)) == floorl(log2l(n)));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int T, i, j, j1, k = 0, n, m, co = 0, check, mi, l, sum;
  long long int ans = 0;
  cin >> T;
  for (i = 0; i < T; i++) {
    string s, s1 = "twone", s2 = "two";
    cin >> s;
    n = s.length();
    set<long long int> second;
    for (j = 0; j < n - 4; j++) {
      co = 0;
      for (k = 0; k < 5; k++) {
        if (s[j + k] != s1[k]) {
          co = 1;
          break;
        }
      }
      if (co == 0) second.insert(j + 2);
    }
    for (j = 0; j < n - 2; j++) {
      co = 0;
      for (k = 0; k < 3; k++) {
        if (s[j + k] != s2[k]) {
          co = 1;
          break;
        }
      }
      if (co == 0 && second.find(j + 2) == second.end()) second.insert(j + 1);
    }
    s2 = "one";
    for (j = 0; j < n - 2; j++) {
      co = 0;
      for (k = 0; k < 3; k++) {
        if (s[j + k] != s2[k]) {
          co = 1;
          break;
        }
      }
      if (co == 0 && second.find(j) == second.end()) second.insert(j + 1);
    }
    cout << second.size() << endl;
    for (auto w : second) {
      cout << w + 1 << " ";
    }
    cout << endl;
  }
}
