#include <iostream>
#include <bits/stdc++.h>
#define endl '\n';
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> v;
typedef vector<long long> vll;
typedef vector<long long int> vlli;

void res() {
    int n,k;
    cin>>n>>k;
    char s[n];
    for(int i=0;i<n;++i) cin>>s[i];
    vector<char> abc = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    char jeste[n];
    int uk(0);
    for(int i=0;i<n;++i) {
        for(int j=i+1;j<n;++j) {
            if(s[i]!=s[j]) {
                jeste[uk]=s[i];
                uk++;
            }
        }
    }
    if(uk>n*2) {
        for(int i=0;i<n;++i) {
            if(i==n-1) cout<<2<<" ";
            else cout<<1<<" ";
        }
    }
    else {
        for(int i=0;i<n;++i) {
            cout<<1<<" ";
        }
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    res();
    return 0;
}