#include <bits/stdc++.h>
using namespace std;
int res[100005];
bool comp(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first != p2.first) return p1.first < p2.first;
  return p2.second < p1.second;
}
int main() {
  int n, a, b;
  while (cin >> n >> a >> b) {
    vector<pair<int, int> > t(n);
    for (int i = 0; i < n; i++) cin >> t[i].first, t[i].second = i;
    if (b - a < 0) {
      sort(t.begin(), t.end());
      for (int i = 0; i < n; i++) {
        if (i < a)
          res[t[i].second] = 1;
        else
          res[t[i].second] = 2;
      }
    } else {
      if (b == a) {
        for (int i = 0; i < n; i++) {
          if (i < a)
            res[i] = 1;
          else
            res[i] = 2;
        }
      } else {
        sort(t.begin(), t.end(), comp);
        for (int i = 0; i < n; i++) {
          if (i < b)
            res[t[i].second] = 2;
          else
            res[t[i].second] = 1;
        }
      }
    }
    printf("%d", res[0]);
    for (int i = 1; i < n; i++) printf(" %d", res[i]);
    puts("");
  }
}
