#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> ans;
  if (a == b) {
    for (int i = 0; i < (int)(a); ++i) ans.push_back(1);
    for (int i = 0; i < (int)(b); ++i) ans.push_back(2);
  }
  if (a < b) {
    priority_queue<pair<int, int> > Q;
    for (int i = 0; i < (int)(n); ++i) {
      int x;
      cin >> x;
      Q.push(make_pair(x, -i));
    }
    ans.resize(n, 2);
    for (int i = 0; i < (int)(a); ++i) {
      ans[-Q.top().second] = 1;
      Q.pop();
    }
  }
  if (a > b) {
    priority_queue<pair<int, int> > Q;
    for (int i = 0; i < (int)(n); ++i) {
      int x;
      cin >> x;
      Q.push(make_pair(x, i));
    }
    ans.resize(n, 1);
    for (int i = 0; i < (int)(b); ++i) {
      ans[Q.top().second] = 2;
      Q.pop();
    }
  }
  for (int i = 0; i < (int)(n); ++i)
    cout << ans[i] << (i == n - 1 ? "\n" : " ");
  return 0;
}
