#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n, A, B;
struct ST {
  int v, id;
  bool operator<(const ST& st) const {
    long long l1 = (long long)v * B + (long long)st.v * A;
    long long l2 = (long long)st.v * B + (long long)v * A;
    if (l1 != l2) return l1 > l2;
    return id < st.id;
  }
} p[maxn];
int ans[maxn];
int main() {
  while (scanf("%d", &n) != EOF) {
    scanf("%d%d", &A, &B);
    for (int i = 0; i < n; i++) {
      scanf("%d", &p[i].v);
      p[i].id = i;
    }
    sort(p, p + n);
    for (int i = 0; i < n; i++) {
      ans[p[i].id] = (i < A ? 1 : 2);
    }
    for (int i = 0; i < n; i++) {
      if (i != 0) printf(" ");
      printf("%d", ans[i]);
    }
    printf("\n");
  }
  return 0;
}
