#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int arr[N];
int n, a, b, c;
vector<pair<int, int>> vec;
bool cmp(pair<int, int> s, pair<int, int> f) {
  if (s.first != f.first) return s.first < f.first;
  if (a >= b) return s.second < f.second;
  return s.second > f.second;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n && scanf("%d", &c); i++) vec.push_back({c, i});
  sort(vec.begin(), vec.end(), cmp);
  if (a > b) {
    for (int i = 0; i < a; ++i) arr[vec[i].second] = 1;
    for (int i = a; i < n; ++i) arr[vec[i].second] = 2;
  } else if (b > a) {
    for (int i = 0; i < b; ++i) arr[vec[i].second] = 2;
    for (int i = b; i < n; ++i) arr[vec[i].second] = 1;
  } else {
    for (int i = 0; i < n; ++i) {
      if (vec[i].second < (n >> 1))
        arr[vec[i].second] = 1;
      else
        arr[vec[i].second] = 2;
    }
  }
  for (int i = 0; i < n; ++i) printf("%d ", arr[i]);
}
