#include <bits/stdc++.h>
using namespace std;
void print(vector<int>& arr) {
  for (int i : arr) cout << i << " ";
}
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  vector<int> arr(n);
  for (int& i : arr) cin >> i;
  if (a == b) {
    for (int i = 0; i < a; i++) cout << "1 ";
    for (int i = 0; i < a; i++) cout << "2 ";
  } else {
    vector<pair<int, int>> arr_p;
    for (int i = 0; i < n; i++) {
      arr_p.push_back({arr[i], i});
    }
    sort(arr_p.begin(), arr_p.end());
    if (a > b) {
      vector<int> ans(n, 1);
      for (int i = n - 1; i >= a; i--) {
        ans[arr_p[i].second] = 2;
      }
      print(ans);
    } else {
      vector<int> ans(n, 2);
      for (int i = n - 1; i >= b; i--) {
        auto it = find(arr.begin(), arr.end(), arr_p[i].first);
        *it = INT_MAX;
        ans[it - arr.begin()] = 1;
      }
      print(ans);
    }
  }
}
