#include <bits/stdc++.h>
using namespace std;
struct node {
  int id;
  int mark;
  int attr;
};
int compare1(const void* a, const void* b) {
  node* x = (node*)a;
  node* y = (node*)b;
  if (x->mark < y->mark)
    return -1;
  else if (x->mark == y->mark) {
    if (x->id < y->id) {
      return 1;
    } else
      return -1;
  } else
    return 1;
}
int compare2(const void* a, const void* b) {
  node* x = (node*)a;
  node* y = (node*)b;
  if (x->mark < y->mark)
    return -1;
  else if (x->mark == y->mark) {
    if (x->id < y->id) {
      return -1;
    } else
      return 1;
  } else
    return 1;
}
int compare3(const void* a, const void* b) {
  node* x = (node*)a;
  node* y = (node*)b;
  if (x->id <= y->id)
    return -1;
  else
    return 1;
}
int main(int argc, char* argv[]) {
  int i, j, k, n, a, b, x, y, sum;
  node t[100002];
  scanf("%d", &n);
  scanf("%d %d", &a, &b);
  sum = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &t[i].mark);
    t[i].id = i;
    t[i].attr = 2;
    sum += t[i].mark;
  }
  if (b != a) {
    if (b > a) {
      qsort(t, n, sizeof(node), compare1);
      for (i = n - 1; i >= n - a; i--) {
        t[i].attr = 1;
      }
    } else if (a > b) {
      qsort(t, n, sizeof(node), compare2);
      for (i = 0; i < a; i++) {
        t[i].attr = 1;
      }
    }
    qsort(t, n, sizeof(node), compare3);
    for (i = 0; i < n; i++) {
      printf("%d", t[i].attr);
      if (i < n - 1)
        printf(" ");
      else
        printf("\n");
    }
  } else {
    for (i = 0; i < a; i++) printf("1 ");
    for (i = 0; i < b - 1; i++) printf("2 ");
    printf("2\n");
  }
  return EXIT_SUCCESS;
}
