#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, i;
  pair<int, int> t[100000];
  int f[100000];
  cin >> n >> a >> b;
  for (i = 0; i < n; ++i) {
    cin >> t[i].first;
    t[i].second = i;
  }
  if (b > a)
    for (i = 0; i < n; ++i) t[i].first *= -1;
  sort(t, t + n);
  if (b > a)
    for (i = 0; i < n; ++i) t[i].first *= -1;
  i = 0;
  if (a != b) {
    for (; i < a; ++i) f[t[i].second] = 1;
    for (; i < n; ++i) f[t[i].second] = 2;
  } else {
    for (; i < a; ++i) f[i] = 1;
    for (; i < n; ++i) f[i] = 2;
  }
  for (i = 0; i < n; ++i) {
    if (i) cout << ' ';
    cout << f[i];
  }
  cout << endl;
  return 0;
}
