#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
const int M = 55;
const int K = 200010;
const int LIT = 2500;
const int INF = 1 << 30;
const int dir[6][2] = {{2, 0}, {-2, 0}, {1, 1}, {-1, 1}, {1, -1}, {-1, -1}};
int dta[N];
int midd[N];
int flg[N];
bool cmp1(int a, int b) { return dta[a] < dta[b] || dta[a] == dta[b] && a < b; }
bool cmp(int a, int b) { return dta[a] > dta[b] || dta[a] == dta[b] && a < b; }
int n, a, b;
void init() {
  scanf("%d", &n);
  scanf("%d %d", &a, &b);
  for (int i = 0; i < n; i++) scanf("%d", &dta[i]);
}
void solve() {
  for (int i = 0; i < n; i++) midd[i] = i;
  if (a == b) {
    for (int i = 0; i < a; i++) flg[i] = 1;
    for (int i = 0; i < b; i++) flg[i + a] = 2;
  } else {
    if (a > b) {
      sort(midd, midd + n, cmp1);
      for (int i = 0; i < a; i++) flg[midd[i]] = 1;
      for (int i = 0; i < b; i++) flg[midd[i + a]] = 2;
    } else {
      sort(midd, midd + n, cmp);
      for (int i = 0; i < a; i++) flg[midd[i]] = 1;
      for (int i = 0; i < b; i++) flg[midd[i + a]] = 2;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i) printf(" ");
    printf("%d", flg[i]);
  }
  printf("\n");
}
int main() {
  init();
  solve();
}
