#include <bits/stdc++.h>
using namespace std;
bool cmp_a_less_b(pair<int, int> a, pair<int, int> b) {
  return (a.first != b.first) ? a.first > b.first : a.second < b.second;
}
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  vector<pair<int, int> > v(n);
  vector<int> res(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &v[i].first);
    v[i].second = i;
  }
  if (a == b) {
    printf("1");
    for (int i = 1; i < n >> 1; ++i) printf(" 1");
    for (int i = n >> 1; i < n; ++i) printf(" 2");
  } else {
    if (a < b) {
      sort(v.begin(), v.end(), cmp_a_less_b);
      for (int i = 0; i < a; ++i) res[v[i].second] = 1;
      for (int i = 0; i < b; ++i) res[v[i + a].second] = 2;
    } else {
      sort(v.begin(), v.end(), greater<pair<int, int> >());
      for (int i = 0; i < b; ++i) res[v[i].second] = 2;
      for (int i = 0; i < a; ++i) res[v[i + b].second] = 1;
    }
    printf("%d", res[0]);
    for (int i = 1; i < n; ++i) printf(" %d", res[i]);
  }
  printf("\n");
  return 0;
}
