#include <iostream>
#include <vector>
using namespace std;
int main()
{
   int N, K;
   cin >> N >> K;
   char s;
   vector <char> S;
   vector <int> P;
   for (int i = 0; i < N; i++){
    cin >> s;
    S.push_back(s);
   }
    for (int i = 0; i < K-1; i++){
        P.push_back(1);
    }
    for (int i = K-1; i < N; i++){
        if (S[i] != S[i-1] || i > K){
            P.push_back(2);
        }
        else if (S[i] == S[i-1]){
            P.push_back(1);
        }
   }
    for(int i = 0; i < N; i++){
        cout << P[i] << " ";
    }
}