#include <bits/stdc++.h>
using namespace std;
const int maxn = 101010;
struct thing {
  int place, key;
} a[maxn];
bool cmp1(const thing &a, const thing &b) {
  if (a.key != b.key) return a.key < b.key;
  return a.place < b.place;
}
bool cmp2(const thing &a, const thing &b) {
  if (a.key != b.key) return a.key < b.key;
  return a.place > b.place;
}
int ans[maxn];
int main() {
  int n, A, B;
  scanf("%d%d%d", &n, &A, &B);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i].key);
    a[i].place = i;
  }
  int cnt, flag;
  if (A == B) {
    for (int i = 1; i <= A; ++i) {
      ans[i] = 1;
      ans[i + A] = 2;
    }
  } else {
    if (A < B) {
      flag = 2, cnt = B;
      sort(a + 1, a + 1 + n, cmp2);
    } else {
      flag = 1, cnt = A;
      sort(a + 1, a + 1 + n, cmp1);
    }
    for (int i = 1; i <= n; ++i) {
      ans[a[i].place] = flag;
      if (--cnt == 0) flag = 3 - flag;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (i > 1) printf(" ");
    printf("%d", ans[i]);
  }
  return 0;
}
