#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 998244353;
const int N = 1e6 + 5;
const int INF = 1e9;
bool check(int n) {
  for (long long i = 3; i * i <= (ll)n; i += 2) {
    if (n % i == 0) return 1;
  }
  return 0;
}
bool ok(int n) { return (floor(log2(n)) == ceil(log2(n))); }
void done() {
  int n;
  cin >> n;
  if (n == 1)
    cout << "FastestFinger";
  else if (n == 2)
    cout << "Ashishgup";
  else if (n & 1)
    cout << "Ashishgup";
  else {
    if ((n / 2) & 1) {
      n /= 2;
      bool ok = 0;
      for (int i = 3; i * i <= n; i += 2) {
        if (n % i == 0) {
          ok = 1;
          break;
        }
      }
      if (ok)
        cout << "Ashishgup";
      else
        cout << "FastestFinger";
    } else {
      while (!(n & 1)) n /= 2;
      if (n != 1)
        cout << "Ashishgup";
      else
        cout << "FastestFinger";
    }
  }
  cout << '\n';
}
void solve() {
  set<int> ans;
  set<int> res;
  string s;
  cin >> s;
  if (s.size() <= 2) {
    cout << 0 << '\n';
    return;
  }
  for (int i = s.size() - 3; i >= 0; i--) {
    char c = s[i], d = s[i + 1], q = s[i + 2];
    if (c == 'o' && d == 'n' && q == 'e') {
      ans.insert(i + 2);
      res.insert(i + 1);
    }
    if (c == 't' && d == 'w' && q == 'o') {
      if (res.find(i + 3) != res.end()) {
        ans.erase(i + 4);
        ans.insert(i + 3);
        continue;
      }
      ans.insert(i + 2);
    }
  }
  cout << ans.size() << '\n';
  for (auto c : ans) cout << c << " ";
  cout << '\n';
}
void another() {}
void test_case() {
  int t;
  cin >> t;
  while (t--) solve();
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  test_case();
}
