#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 * 2 + 321;
pair<int, int> arr[maxn];
bool tmp(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 cmp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.second == b.second) return a.first < b.first;
  return a.second < b.second;
}
int main() {
  ios::sync_with_stdio(false);
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  if (a == b) {
    for (int i = 0; i < a; i++) cout << 1 << " ";
    for (int i = 0; i < a; i++) cout << 2 << " ";
    cout << endl;
    return 0;
  }
  int ah = 1;
  if (a < b) {
    ah += 1;
    swap(a, b);
    sort(arr, arr + n, tmp);
  } else
    sort(arr, arr + n);
  for (int i = 0; i < a; i++) arr[i].first = ah;
  for (int i = a; i < n; i++) arr[i].first = (ah % 2) + 1;
  sort(arr, arr + n, cmp);
  for (int i = 0; i < n; i++) cout << arr[i].first << " ";
  cout << endl;
  return 0;
}
