#include <bits/stdc++.h>
using namespace std;
long long i, j, k, l, n, m, mask, cnt;
string s;
set<long long> res;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int nt;
  cin >> nt;
  while (nt--) {
    cin >> s;
    if (s.length() < 3) {
      cout << 0 << '\n';
      continue;
    }
    if (s.length() == 3) {
      if (s == "one" || s == "two")
        cout << 1 << '\n' << 1 << '\n';
      else
        cout << 0 << '\n';
      continue;
    }
    res.clear();
    s += 't';
    for (i = 0; i < s.length() - 3; i++) {
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' && s[i + 3] != 'o')
        res.insert(i + 3);
      if (s[i] != 'o' && s[i + 1] == 'o' && s[i + 2] == 'n' && s[i + 3] == 'e')
        res.insert(i + 2);
      if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' && s[i + 3] == 'o')
        res.insert(i + 2);
      if (s[i] == 'o' && s[i + 1] == 'o' && s[i + 2] == 'n' && s[i + 3] == 'e')
        res.insert(i + 3);
      if (i == 0 && s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e')
        res.insert(1);
    }
    cout << res.size() << '\n';
    for (auto to : res) cout << to << ' ';
    cout << '\n';
  }
  exit(0);
}
