#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
int n, a, b;
int scores[MAXN], answer[MAXN];
pair<int, int> tmp_scores[MAXN];
void solve() {
  if (a == b) {
    for (int i = 0; i < a; ++i) printf("1 ");
    for (int i = 0; i < b; ++i) printf("2 ");
    printf("\n");
    return;
  }
  if (b < a)
    for (int i = 0; i < n; ++i) tmp_scores[i] = make_pair(scores[i], i);
  else
    for (int i = 0; i < n; ++i) tmp_scores[i] = make_pair(6 - scores[i], i);
  sort(&tmp_scores[0], &tmp_scores[n]);
  for (int i = 0; i < a; ++i) answer[tmp_scores[i].second] = 1;
  for (int i = a; i < n; ++i) answer[tmp_scores[i].second] = 2;
  for (int i = 0; i < n; ++i) printf("%d ", answer[i]);
  printf("\n");
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; ++i) scanf("%d", &scores[i]);
  solve();
  return 0;
}
