#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-6;
const int maxn = 200000;
char who[maxn];
int t[maxn], y[maxn];
int need[10], taken[10];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t[i]);
    y[i] = t[i];
  }
  if (a == b) {
    for (int i = 0; i < a; i++) {
      printf("1 ");
    }
    for (int i = 0; i < b; i++) {
      printf("2 ");
    }
    puts("");
    return 0;
  }
  sort(y, y + n);
  if (b > a) {
    for (int i = n - a; i < n; i++) {
      need[y[i]]++;
    }
  } else {
    for (int i = 0; i < a; i++) {
      need[y[i]]++;
    }
  }
  memset(who, 2, sizeof(who));
  for (int i = 0; i < n; i++) {
    if (taken[t[i]] < need[t[i]]) {
      who[i] = 1;
      taken[t[i]]++;
    }
  }
  for (int i = 0; i < n; i++) {
    int z = who[i];
    printf("%d ", z);
  }
  puts("");
  return 0;
}
