#include <bits/stdc++.h>
using namespace std;
struct node {
  int ii;
  int id;
  int ss;
} zz[100005];
bool cmp1(node a, node b) {
  if (a.ss == b.ss) return a.ii < b.ii;
  return a.ss > b.ss;
}
bool cmp2(node a, node b) {
  if (a.ss == b.ss) return a.ii > b.ii;
  return a.ss > b.ss;
}
bool cmp(node a, node b) { return a.ii < b.ii; }
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int a, b;
    scanf("%d %d", &a, &b);
    int i, j;
    int x = 5;
    for (i = 0; i < n; ++i) {
      scanf("%d", &zz[i].ss);
      zz[i].ii = i;
    }
    if (a == b) {
      printf("1");
      for (i = 1; i < n / 2; ++i) {
        printf(" %d", 1);
      }
      for (; i < n; ++i) {
        printf(" %d", 2);
      }
      puts("");
      continue;
    }
    if (a > b) {
      sort(zz, zz + n, cmp2);
      for (i = 0; i < b; ++i) zz[i].id = 2;
      for (; i < n; ++i) zz[i].id = 1;
    } else {
      sort(zz, zz + n, cmp1);
      for (i = 0; i < a; ++i) zz[i].id = 1;
      for (; i < n; ++i) zz[i].id = 2;
    }
    sort(zz, zz + n, cmp);
    for (i = 0; i < n; ++i) {
      if (i) printf(" ");
      printf("%d", zz[i].id);
    }
    puts("");
  }
  return 0;
}
