#include<bits/stdc++.h> using namespace std; //#include<atcoder/all> //using namespace atcoder; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0;i<(n);++i) int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; string s; cin >> s; vector<int> ans; for(int i=0;i<n;++i){ if(s[i]=='o')ans.emplace_back(i+1); while(i+1<n && s[i]==s[i+1]){ i++; } } int m = ans.size(); cout << m << endl; for(int i=0;i<m;++i) cout << ans[i] << " "; }