#include <bits/stdc++.h>
using namespace std;
pair<int, int> d[300000];
int ans[300008];
int a, b, n;
int main() {
  int i;
  scanf("%d", &n);
  scanf("%d%d", &a, &b);
  for (i = 1; i <= n; i++) scanf("%d", &d[i].first), d[i].second = i;
  sort(d + 1, d + 1 + n);
  if (a > b) {
    for (i = 1; i <= a; i++) ans[d[i].second] = 1;
  } else if (a == b) {
    for (i = 1; i <= a; i++) ans[i] = 1;
  } else {
    for (i = 1; i <= n; i++) d[i].second *= -1;
    sort(d + 1, d + 1 + n);
    for (i = b + 1; i <= n; i++) ans[-d[i].second] = 1;
  }
  for (i = 1; i <= n; i++)
    if (ans[i] & 1)
      printf("1 ");
    else
      printf("2 ");
}
