#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int tt[N], ii[N];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  if (a == b) {
    while (a--) cout << "1 ";
    while (b--) cout << "2 ";
    cout << '\n';
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> tt[i];
    ii[i] = i;
  }
  if (a > b) {
    sort(ii, ii + n,
         [](int i, int j) { return tt[i] < tt[j] || tt[i] == tt[j] && i < j; });
    fill(tt, tt + n, 2);
    for (int h = 0; h < a; h++) tt[ii[h]] = 1;
  } else {
    sort(ii, ii + n,
         [](int i, int j) { return tt[i] < tt[j] || tt[i] == tt[j] && i > j; });
    fill(tt, tt + n, 1);
    for (int h = 0; h < b; h++) tt[ii[h]] = 2;
  }
  for (int i = 0; i < n; i++) cout << tt[i] << ' ';
  cout << '\n';
  return 0;
}
