#include <bits/stdc++.h>
using namespace std;
int A[1001];
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first) return a.first > b.first;
  return a.second < b.second;
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  int arr[n];
  vector<pair<int, int>> dp;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    dp.push_back({arr[i], i});
  }
  int ans = 0;
  if (a > b) {
    sort(dp.begin(), dp.end());
    for (int i = 0; i <= a - 1; i++) {
      arr[dp[i].second] = 1;
    }
    for (int i = a; i < n; i++) {
      arr[dp[i].second] = 2;
    }
  } else if (a < b) {
    sort(dp.begin(), dp.end(), cmp);
    for (int i = 0; i <= a - 1; i++) {
      arr[dp[i].second] = 1;
    }
    for (int i = a; i < n; i++) {
      arr[dp[i].second] = 2;
    }
  } else {
    for (int i = 0; i <= a - 1; i++) {
      arr[dp[i].second] = 1;
    }
    for (int i = a; i < n; i++) {
      arr[dp[i].second] = 2;
    }
  }
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << endl;
}
