#include <bits/stdc++.h>
int main() {
  int u[100010], a, n, b, v[100010], chay;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) scanf("%d", &u[i]);
  for (int i = 1; i <= n; i++) v[i] = 2;
  if (a == b) {
    for (int i = 1; i <= a; i++) v[i] = 1;
  } else if (a < b) {
    chay = 0;
    for (int i = 5; i >= 1; i--) {
      for (int j = 1; j <= n; j++) {
        if (u[j] == i) {
          v[j] = 1;
          chay++;
        }
        if (chay == a) break;
      }
      if (chay == a) break;
    }
  } else {
    chay = 0;
    for (int i = 1; i <= 5; i++) {
      for (int j = 1; j <= n; j++) {
        if (u[j] == i) {
          v[j] = 1;
          chay++;
        }
        if (chay == a) break;
      }
      if (chay == a) break;
    }
  }
  for (int i = 1; i <= n - 1; i++) printf("%d ", v[i]);
  printf("%d", v[n]);
}
