#include <bits/stdc++.h>
using namespace std;
struct num {
  int number, cnt;
};
int tmp[100010];
int res[100010];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    int a, b;
    scanf("%d%d", &a, &b);
    for (int i = 0; i < n; i++) {
      scanf("%d", &tmp[i]);
    }
    int total = 0;
    if (a == b) {
      for (int i = 0; i < n; i++) {
        if (i < a)
          printf("1");
        else
          printf("2");
        if (i != n - 1) printf(" ");
      }
      printf("\n");
      continue;
    }
    if (a > b) {
      for (int now = 1; now <= 5; now++) {
        for (int i = 0; i < n; i++) {
          if (tmp[i] == now) {
            if (total < a)
              res[i] = 1;
            else
              res[i] = 2;
            total++;
          }
        }
      }
    } else {
      for (int now = 5; now > 0; now--) {
        for (int i = 0; i < n; i++) {
          if (tmp[i] == now) {
            if (total < a)
              res[i] = 1;
            else
              res[i] = 2;
            total++;
          }
        }
      }
    }
    for (int i = 0; i < n; i++) {
      printf("%d", res[i]);
      if (i != n - 1) printf(" ");
    }
    printf("\n");
  }
  return 0;
}
