#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MXN = 2e5 + 7;
int n, a, b;
int ans[MXN];
pair<int, int> arr[MXN];
bool yetanothercmp(pair<int, int> x, pair<int, int> y) {
  if (x.first != y.first) return x.first > y.first;
  return x.second < y.second;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i].first);
    arr[i].second = i;
  }
  if (a > b) sort(arr, arr + n);
  if (b > a) sort(arr, arr + n, yetanothercmp);
  for (int i = 0; i < a; i++) ans[arr[i].second] = 1;
  for (int i = a; i < n; i++) ans[arr[i].second] = 2;
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
