#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[100009];
int res[100009];
bool cmpsmall(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first < b.first;
}
bool cmplarge(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
int main() {
  int N, a, b, i;
  while (scanf("%d", &N) != EOF) {
    scanf("%d%d", &a, &b);
    for (i = 0; i < N; ++i) {
      scanf("%d", &arr[i].first);
      arr[i].second = i;
    }
    if (a == b) {
      ;
    } else if (a > b) {
      sort(arr, arr + N, cmpsmall);
    } else if (b > a) {
      sort(arr, arr + N, cmplarge);
    }
    for (i = 0; i < N; ++i) {
      if (i < a)
        res[arr[i].second] = 1;
      else
        res[arr[i].second] = 2;
    }
    for (i = 0; i < N; ++i) {
      if (i) putchar(' ');
      printf("%d", res[i]);
    }
    puts("");
  }
  return 0;
}
