#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  if (a == b) {
    for (int i = 0; i < a; i++) cout << 1 << " ";
    for (int i = 0; i < b; i++) cout << 2 << " ";
    return 0;
  }
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  vector<int> barr = arr;
  sort(barr.begin(), barr.end());
  vector<int> need;
  if (b < a)
    for (int i = n - 1, j = 0; j < b; i--, j++) need.push_back(barr[i]);
  else
    for (int i = 0; i < b; i++) need.push_back(barr[i]);
  int mas[6];
  memset(mas, 0, sizeof(mas));
  for (int i = 0; i < need.size(); i++) mas[need[i]]++;
  vector<int> ans(n, 1);
  for (int i = 1; i <= 5; i++) {
    int cur = 0, pos = n - 1;
    while (cur < mas[i]) {
      if (arr[pos] == i) {
        cur++;
        ans[pos] = 2;
      }
      pos--;
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
