#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int mas[100010], ans[100010];
struct my {
  int v, ind;
};
my mas2[100010];
bool fun1(const my &a, const my &b) {
  if (a.v < b.v) return true;
  if (a.v > b.v) return false;
  return a.ind < b.ind;
}
bool fun2(const my &a, const my &b) {
  if (a.v > b.v) return true;
  if (a.v < b.v) return false;
  return a.ind < b.ind;
}
int main() {
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    scanf("%d", &mas[i]);
    mas2[i].v = mas[i];
    mas2[i].ind = i;
  }
  if (a < b) {
    sort(mas2, mas2 + n, fun2);
    for (int i = 0; i < n; i++)
      if (i < a)
        ans[mas2[i].ind] = 1;
      else
        ans[mas2[i].ind] = 2;
  } else if (a > b) {
    sort(mas2, mas2 + n, fun1);
    for (int i = 0; i < n; i++)
      if (i < a)
        ans[mas2[i].ind] = 1;
      else
        ans[mas2[i].ind] = 2;
  } else {
    for (int i = 0; i < n; i++)
      if (i < a)
        ans[i] = 1;
      else
        ans[i] = 2;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  return 0;
}
