#include <bits/stdc++.h>
using namespace std;
const int inf = 2000 * 1000 * 1000;
const long long linf = 2000000000000000000LL;
const double eps = 1e-9;
void prepare() {}
bool cmp1(pair<int, int> &a, pair<int, int> &b) {
  return a.first < b.first || a.first == b.first && a.second > b.second;
}
bool cmp2(pair<int, int> &a, pair<int, int> &b) {
  return a.first < b.first || a.first == b.first && a.second < b.second;
}
pair<int, int> a[100005];
int n;
int A, B;
int col[100005];
bool solve() {
  memset((col), false, sizeof(col));
  scanf("%d", &n);
  scanf("%d%d", &A, &B);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  if (A == B) {
    for (int i = 0; i < A; i++) printf("1 ");
    for (int i = 0; i < A; i++) printf("2 ");
    printf("\n");
    return false;
  }
  if (A > B) {
    for (int i = 0; i < n; i++) col[i] = 1;
    sort(a, a + n, cmp2);
    for (int i = n - 1; i >= n - B; i--) {
      col[a[i].second] = 2;
    }
  } else {
    for (int i = 0; i < n; i++) col[i] = 2;
    sort(a, a + n, cmp1);
    for (int i = n - 1; i >= n - A; i--) {
      col[a[i].second] = 1;
    }
  }
  for (int i = 0; i < n; i++) printf("%d ", col[i]);
  printf("\n");
  return false;
}
int main() {
  prepare();
  while (solve())
    ;
  return 0;
}
