#include <iostream>
#include <vector>
#include <string>

using namespace std;

void solve_pairs(int n, const string& s) {
    vector<int> fence1, fence2;

    for (int i = 0; i + 1 < n; i += 2) {
        if (s[i] == s[i + 1]) {
            fence1.push_back(i);
            fence2.push_back(i + 1);
        }
    }

    int k = fence1.size();
    cout << k << "\n";
    for (int i = 0; i < k; ++i) cout << fence1[i] << (i == k - 1 ? "" : " ");
    cout << "\n";
    for (int i = 0; i < k; ++i) cout << fence2[i] << (i == k - 1 ? "" : " ");
    cout << "\n";
}

int main(){
	int n, g; cin >> n >> g;
	string s; cin >> s;
	solve_pairs(n, s);
}
