#include <bits/stdc++.h>
using namespace std;
bool CMP1(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first) return a.first > b.first;
  return a.second < b.second;
}
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  vector<pair<int, int> > arr(n);
  vector<int> ans(n, 2);
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  if (a < b)
    sort(arr.begin(), arr.end(), CMP1);
  else if (a > b)
    sort(arr.begin(), arr.end());
  ans.assign(n, 2);
  for (int i = 0; i < a; i++) ans[arr[i].second] = 1;
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
  return 0;
}
