#include <bits/stdc++.h>
using namespace std;
int n, b[100000 + 100], sum;
double sr1, sr2;
pair<int, int> b1[100000 + 100];
int pom[100000 + 100], pom2[100000 + 100];
bool ls(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first) return a.first < b.first;
  return a.second > b.second;
}
int main() {
  scanf("%d", &n);
  int aa, bb;
  scanf("%d %d", &aa, &bb);
  if (aa == bb) {
    for (int i = 0; i < aa; i++) printf("1 ");
    for (int i = 0; i < aa; i++) printf("2 ");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i]);
    b1[i].first = b[i];
    b1[i].second = i;
    sum += b[i];
  }
  sort(b1, b1 + n);
  int sum1 = 0, sum2 = 0;
  for (int i = 0; i < aa; i++) {
    sum1 += b1[i].first;
    sum2 += b1[n - 1 - i].first;
  }
  sr1 = (double)((double)sum1 / (double)aa) +
        (double)((double)(sum - sum1) / (double)bb);
  sr2 = (double)((double)sum2 / (double)aa) +
        (double)((double)(sum - sum2) / (double)bb);
  if (sr1 >= sr2) {
    for (int i = 0; i < aa; i++) pom[b1[i].second] = 1;
    for (int i = 0; i < n; i++)
      if (pom[i] == 1)
        printf("1 ");
      else
        printf("2 ");
  } else {
    sort(b1, b1 + n, ls);
    for (int i = 0; i < aa; i++) pom[b1[n - i - 1].second] = 1;
    for (int i = 0; i < n; i++)
      if (pom[i] == 1)
        printf("1 ");
      else
        printf("2 ");
  }
  return 0;
}
