#include <iostream>
#include <string>

using namespace std;

int main ()
{
    unsigned int length, n_letters; // n, k
    string letters;

    cin >> length >> n_letters;

    int r=1;
    string store = "";
    for(int i=0; i<length; i++)
    {
        char x;
        cin >> x;
        bool add;
        add=true;
        for(char c : store)
        {
            if(c == x)
                add=false;
        }
        if(add)
            store += x;

        if(store.size() == n_letters)
        {
            r++;
            store = "";
        }

        cout << r << endl;

    }
    return 0;
}