#include <bits/stdc++.h>
using namespace std;
template <class t, class u>
void chmax(t &first, u second) {
  if (first < second) first = second;
}
template <class t, class u>
void chmin(t &first, u second) {
  if (second < first) first = second;
}
vector<int> type;
int main() {
  int n, cnt_a, cnt_b;
  scanf("%d", &n);
  scanf("%d", &cnt_a);
  scanf("%d", &cnt_b);
  vector<pair<int, pair<int, int> > > marks;
  type.assign(n, 0);
  for (int rep = 0; rep < n; ++rep) {
    int x;
    scanf("%d", &x);
    marks.emplace_back(make_pair(cnt_a * x, make_pair(2, -1 * rep)));
    marks.emplace_back(make_pair(cnt_b * x, make_pair(1, rep)));
  }
  if (cnt_a == cnt_b) {
    for (int rep = 0; rep < cnt_a; ++rep) {
      printf("%d ", 1);
    }
    for (int rep = 0; rep < cnt_b; ++rep) {
      printf("%d ", 2);
    }
  } else {
    sort(marks.begin(), marks.end());
    for (auto &p : marks) {
      int kind = p.second.first, index = p.second.second;
      if (kind == 2) index *= -1;
      if (cnt_a > 0 && kind == 1 && type[index] == 0) {
        type[index] = kind;
        --cnt_a;
      } else if (cnt_b > 0 && kind == 2 && type[index] == 0) {
        type[index] = kind;
        --cnt_b;
      }
    }
    for (int i = 0; i < n; i++) printf("%d ", type[i]);
  }
  printf("\n");
  return 0;
}
