#include <bits/stdc++.h>
using namespace std;
const long long int inf = 9e18;
const long double pi = 2 * acos(0.0);
long long int t, n, ans;
string s, s1, s2;
vector<long long int> arr;
long long int power(long long int x, long long int y) {
  long long int res = 1ll;
  while (y > 0) {
    if (y & 1) res = res * x;
    y >>= 1;
    x = x * x;
  }
  return res;
}
void solve() {
  arr.clear(), ans = 0;
  cin >> s;
  n = (int)((s).size());
  ;
  for (int i = 0; i < n - 2; i++) {
    string temp = s.substr(i, 3);
    if (i + 4 <= n - 1) {
      string temp1 = s.substr(i + 2, 3);
      if (temp == s2 && temp1 == s1) {
        ans++, arr.push_back(i + 2);
        i += 4;
      } else if (temp1 != s2 && (temp == s1 || temp == s2)) {
        ans++, arr.push_back(i + 1);
        i += 2;
      }
    } else {
      if (temp == s1 || temp == s2) {
        ans++, arr.push_back(i + 1);
        i += 2;
      }
    }
  }
  cout << ans << "\n";
  ;
  for (int i = 0; i < ans; i++) {
    cout << arr[i] + 1 << " ";
  }
  cout << "\n";
}
int32_t main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  s1 = "one";
  s2 = "two";
  cin >> t;
  while (t--) {
    solve();
  }
}
