#include <bits/stdc++.h>
using namespace std;
int revcmp(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first > b.first || (a.first == b.first && a.second < b.second);
}
int main(void) {
  int n, a, b;
  cin >> n >> a >> b;
  vector<pair<int, int> > v;
  v.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i].first;
    v[i].second = i;
  }
  if (a < b)
    sort(v.begin(), v.end(), revcmp);
  else if (a > b)
    sort(v.begin(), v.end());
  char ans[n];
  for (int i = 0; i < a; ++i) ans[v[i].second] = '1';
  for (int i = a; i < n; ++i) ans[v[i].second] = '2';
  for (int i = 0; i < n; ++i) {
    if (i) cout << " ";
    cout << ans[i];
  }
  return 0;
}
