#include <bits/stdc++.h>
using namespace std;
bool comp1(pair<long long int, long long int> &p1,
           pair<long long int, long long int> &p2) {
  if ((p1.first) > (p2.first))
    return true;
  else if ((p1.first) < (p2.first))
    return false;
  else {
    return (p1.second < p2.second);
  }
}
int main() {
  long long int n;
  cin >> n;
  long long int a, b;
  cin >> a >> b;
  vector<long long int> A(n);
  for (long long int i = 0; i < n; i++) cin >> A[i];
  vector<pair<long long int, long long int>> p;
  for (long long int i = 0; i < n; i++) p.push_back(make_pair(A[i], i));
  vector<long long int> B(n);
  if (a > b) {
    sort(p.begin(), p.end());
    for (long long int i = 0; i < a; i++) B[p[i].second] = 1;
    for (long long int i = a; i < n; i++) B[p[i].second] = 2;
  } else if (a == b) {
    for (long long int i = 0; i < a; i++) B[i] = 1;
    for (long long int i = a; i < n; i++) B[i] = 2;
  } else {
    sort(p.begin(), p.end(), comp1);
    for (long long int i = 0; i < a; i++) B[p[i].second] = 1;
    for (long long int i = a; i < n; i++) B[p[i].second] = 2;
  }
  for (long long int i = 0; i < n; i++) cout << B[i] << " ";
  cout << endl;
}
