#include <bits/stdc++.h>
using namespace std;
int flag[100010], a, b;
struct node {
  int id, v;
} num[100010];
bool cmp(node c, node d) {
  if (c.v != d.v) return c.v < d.v;
  if (a > b) return c.id < d.id;
  return c.id > d.id;
}
int main() {
  int n, i;
  while (~scanf("%d%d%d", &n, &a, &b)) {
    for (i = 0; i < n; i++) scanf("%d", &num[i].v), num[i].id = i;
    if (a == b) {
      for (i = 0; i < a; i++) flag[i] = 1;
      for (; i < n; i++) flag[i] = 2;
    } else {
      sort(num, num + n, cmp);
      if (a > b) {
        for (i = 0; i < a; i++) flag[num[i].id] = 1;
        for (; i < n; i++) flag[num[i].id] = 2;
      } else {
        for (i = 0; i < b; i++) flag[num[i].id] = 2;
        for (; i < n; i++) flag[num[i].id] = 1;
      }
    }
    printf("%d", flag[0]);
    for (i = 1; i < n; i++) printf(" %d", flag[i]);
    puts("");
  }
  return 0;
}
