#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);


    int n, k; cin>>n>>k;
    int s=1;
    char last; cin>>last;

    cout<<1<<" ";

    for(int i=0; i<n-1; i++){
        char x; cin>>x;

        if(x!=last){
            last = x;
            s++;
        }
        if(s==k){
            cout<<2<<" ";
        }
        else{
            cout<<1<<" ";
        }
    }

    return 0;
}