#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    string a;
    cin >> a;
    int ans = 0;
    vector<int> vc;
    for (size_t i = 0; i < a.size(); i++) {
      if (a[i] == 'w' && a[i - 1] == 't' && a[i + 1] == 'o' &&
          a[i + 2] == 'o' && i > 0 && i < a.size() - 2) {
        ans++;
        vc.push_back(i + ans);
        a.erase(a.begin() + i);
      } else if (a[i] == 'o' && a[i - 1] == 'w' && a[i - 2] == 't' && i > 1) {
        ans++;
        vc.push_back(i + ans);
        a.erase(a.begin() + i);
      } else if (a[i] == 'n' && a[i - 1] == 'o' && a[i + 1] == 'e' &&
                 i < a.size() - 1 && i) {
        ans++;
        vc.push_back(i + ans);
        a.erase(a.begin() + i);
      }
    }
    cout << ans << endl;
    for (auto i : vc) {
      cout << i << " ";
    }
    cout << endl;
  }
}
