#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first < b.first) return true;
  if (a.first == b.first) {
    if (a.second > b.second)
      return true;
    else
      return false;
  }
  if (a.first > b.first) return false;
}
int main() {
  int n, a, b, aux;
  vector<pair<int, int> > marks;
  cin >> n >> a >> b;
  int m[n];
  for (int i = 0; i < n; i++) {
    cin >> aux;
    marks.push_back(make_pair(aux, i));
  }
  if (a == b) {
    for (int i = 0; i < a; i++) m[i] = 1;
    for (int i = a; i < n; i++) m[i] = 2;
  } else {
    if (a < b) {
      sort(marks.begin(), marks.end(), cmp);
      for (int i = 0; i < a; i++) m[marks[marks.size() - 1 - i].second] = 1;
      for (int i = a; i < n; i++) m[marks[marks.size() - 1 - i].second] = 2;
    }
    if (a > b) {
      sort(marks.begin(), marks.end());
      for (int i = 0; i < b; i++) m[marks[marks.size() - 1 - i].second] = 2;
      for (int i = b; i < n; i++) m[marks[marks.size() - 1 - i].second] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << m[i];
    if (i != n - 1) cout << " ";
  }
  return 0;
}
