#include <bits/stdc++.h>
using namespace std;
template <typename T>
T myMax(T x, T y) {
  return (x > y) ? x : y;
}
struct myComp1 {
  constexpr bool operator()(
      pair<long long, long long> const& a,
      pair<long long, long long> const& b) const noexcept {
    return a.second < b.second;
  }
};
struct myComp2 {
  constexpr bool operator()(
      pair<long long, long long> const& a,
      pair<long long, long long> const& b) const noexcept {
    return a.second > b.second;
  }
};
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               myComp1>
    p1;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               myComp2>
    p2;
long long ceili(long long a, long long b) {
  return a % b == 0 ? (a / b) : (a / b) + 1;
}
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  std::cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    long long n = s.length();
    long long ans = 0;
    string check1 = "twone", check2 = "two", check3 = "one";
    for (long long i = 0; i < n; i++) {
      if (s[i] == 't') {
        if ((i + 4) < n) {
          if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o' &&
              s[i + 3] == 'n' && s[i + 4] == 'e') {
            s[i] = '-';
            s[i + 1] = '-';
            s[i + 2] = '?';
            s[i + 3] = '-';
            s[i + 4] = '-';
            continue;
          }
        }
        if ((i + 2) < n) {
          if (s[i] == 't' && s[i + 1] == 'w' && s[i + 2] == 'o') {
            s[i] = '-';
            s[i + 1] = '?';
            s[i + 2] = '-';
            continue;
          }
        }
      } else if (s[i] == 'o') {
        if ((i + 2) < n) {
          if (s[i] == 'o' && s[i + 1] == 'n' && s[i + 2] == 'e') {
            s[i] = '-';
            s[i + 1] = '?';
            s[i + 2] = '-';
          }
        }
      }
    }
    ans = count(s.begin(), s.end(), '?');
    cout << ans << "\n";
    for (long long i = 0; i < n; i++) {
      if (s[i] == '?') cout << (i + 1) << " ";
    }
    cout << "\n";
  }
  return 0;
}
