#include <bits/stdc++.h>
using namespace std;
struct Roo {
  long long e, ind;
  Roo() {
    e = 0;
    ind = 0;
  }
} arr[100100];
long long brr[100100];
int ch;
bool cmp(Roo a, Roo b) {
  if (a.e > b.e)
    return 1;
  else if (a.e == b.e) {
    if ((ch == 1) && (a.ind < b.ind)) return 1;
    if ((ch == 2) && (a.ind > b.ind)) return 1;
  }
  return 0;
}
int main() {
  long long n, a, b, i, it;
  cin >> n >> a >> b;
  for (i = 1; i <= n; i++) {
    cin >> arr[i].e;
    arr[i].ind = i;
  }
  if (a == b) {
    for (i = 1; i <= n; i++) {
      if (i <= a)
        cout << "1 ";
      else
        cout << "2 ";
    }
    return 0;
  }
  it = 1;
  ch = 1;
  if (a > b) it = 2, ch = 2;
  sort(arr + 1, arr + 1 + n, cmp);
  for (i = 1; i <= min(a, b); i++) {
    brr[arr[i].ind] = it;
  }
  for (i = 1; i <= n; i++) {
    if (brr[i] != 0)
      cout << brr[i] << " ";
    else {
      if (it == 1)
        cout << "2 ";
      else
        cout << "1 ";
    }
  }
  return 0;
}
