#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-10;
struct S {
  int v, index;
};
bool order1(S s1, S s2) {
  if (s1.v == s2.v) return s1.index < s2.index;
  return s1.v < s2.v;
}
bool order2(S s1, S s2) {
  if (s1.v == s2.v) return s1.index > s2.index;
  return s1.v < s2.v;
}
int main() {
  int n, a, b, result[100000];
  S A[100000];
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    S s;
    cin >> s.v;
    s.index = i;
    A[i] = s;
  }
  if (a == b) {
    for (int i = 0; i < a; i++) cout << 1 << " ";
    for (int i = 0; i < b; i++) {
      if (i == b - 1)
        cout << 2;
      else
        cout << 2 << " ";
    }
    cout << endl;
    return 0;
  }
  if (a < b) {
    sort(A, A + n, order2);
    for (int i = 0; i < b; i++) {
      result[A[i].index] = 2;
    }
    for (int i = b; i < n; i++) {
      result[A[i].index] = 1;
    }
  } else {
    sort(A, A + n, order1);
    for (int i = 0; i < a; i++) {
      result[A[i].index] = 1;
    }
    for (int i = a; i < n; i++) {
      result[A[i].index] = 2;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i == n - 1)
      cout << result[i];
    else
      cout << result[i] << " ";
  }
  cout << endl;
  return 0;
}
