#include <bits/stdc++.h>
using namespace std;
const int LEN = (int)1e5 + 9;
pair<int, int> mark[LEN];
int a, b, n, ans[LEN];
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &mark[i].first);
    mark[i].second = i;
  }
  if (a == b) {
    for (int i = 0; i < n / 2; ++i) {
      printf("1 ");
    }
    for (int i = 0; i < n / 2; ++i) {
      printf("2 ");
    }
    puts("");
    return 0;
  }
  bool reversed = false;
  if (a > b) {
    swap(a, b);
    reversed = true;
  }
  sort(mark, mark + n, [&](pair<int, int> const& a, pair<int, int> const& b) {
    return a.first > b.first ||
           (a.first == b.first &&
            (!reversed ? a.second < b.second : a.second > b.second));
  });
  for (int i = 0; i < a; ++i) {
    ans[mark[i].second] = !reversed ? 1 : 2;
  }
  for (int i = a; i < n; ++i) {
    ans[mark[i].second] = !reversed ? 2 : 1;
  }
  for (int i = 0; i < n; ++i) {
    printf("%d ", ans[i]);
  }
  puts("");
  return 0;
}
