#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
const long long int N = 1e5 + 5;
long long int mod = 998244353;
void null() {
  string s;
  cin >> s;
  string a = "one", b = "two", c = "twone";
  long long int i = 0, n = s.size(), ans = 0;
  vector<long long int> res;
  while (i < n) {
    if (i + 2 >= n) {
      break;
    }
    string curr = s.substr(i, 3);
    if (curr == "two") {
      if (i + 4 < n and s[i + 3] == 'n' and s[i + 4] == 'e') {
        res.push_back(i + 2);
        i += 5;
      } else {
        res.push_back(i + 1);
        i += 3;
      }
    } else if (curr == "one") {
      res.push_back(i + 1);
      i += 3;
    } else
      i++;
  }
  cout << res.size() << '\n';
  for (auto &i : res) cout << i + 1 << " ";
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  cout << setprecision(4);
  cout << fixed;
  long long int t = 1;
  clock_t start, end;
  start = clock();
  cin >> t;
  while (t--) {
    null();
  }
  end = clock();
  double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
}
