#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int n, A, B, r[200000];
pair<int, int> a[200000];
int main() {
  cin >> n >> A >> B;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].first);
    a[i].second = i;
    if (A < B) a[i].first *= (-1);
  }
  if (A != B) sort(a, a + n);
  for (int i = 0; i < A; ++i) r[a[i].second] = 1;
  for (int i = A; i < n; ++i) r[a[i].second] = 2;
  for (int i = 0; i < n; ++i) cout << r[i] << " ";
  return 0;
}
