#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, f[200005], g[200005];
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 0; i < n; i++) {
    scanf("%d", &f[i]);
    g[i] = f[i];
  }
  sort(f, f + n);
  int m = n - min(a, b);
  int p, cnt = 0, tcnt = 1;
  for (p = m - 1; p >= 0 && f[p] == f[m]; p--, cnt++)
    ;
  for (p = m + 1; p < n && f[p] == f[m]; p++, tcnt++)
    ;
  int ta = a, tb = b;
  for (int i = 0; i < n; i++) {
    if (a < b) {
      if (g[i] > f[m])
        printf("1 ");
      else if (g[i] < f[m])
        printf("2 ");
      else if (tcnt)
        printf("1 "), tcnt--;
      else
        printf("2 ");
    } else if (a > b) {
      if (g[i] > f[m])
        printf("2 ");
      else if (g[i] < f[m])
        printf("1 ");
      else if (cnt)
        printf("1 "), cnt--;
      else
        printf("2 ");
    } else {
      if (ta)
        printf("1 "), ta--;
      else
        printf("2 "), tb--;
    }
  }
  return 0;
}
