#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.first == b.first) return a.second > b.second;
  return a.first < b.first;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int x, n, m;
  cin >> x >> n >> m;
  long long int p = 1, q = 2;
  vector<pair<long long int, long long int>> a(x);
  for (long long int i = 0; i < x; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  if (n == m) {
    for (long long int i = 0; i < n; i++) cout << 1 << " ";
    for (long long int i = n; i < x; i++) cout << 2 << " ";
    return 0;
  }
  long long int r = 1;
  if (n < m) {
    swap(n, m);
    swap(p, q);
    r = 0;
  }
  if (r == 0)
    sort(a.begin(), a.end(), comp);
  else
    sort(a.begin(), a.end());
  vector<long long int> ans(x);
  for (long long int i = 0; i < n; i++) ans[a[i].second] = p;
  for (long long int i = n; i < x; i++) ans[a[i].second] = q;
  for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
