#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000000, mod = 1000000007;
const double eps = 0.000001;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> x(n), p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    x[i] = p[i];
  }
  if (a == b) {
    for (int i = 0; i < n / 2; i++) cout << 1 << ' ';
    for (int i = 0; i < n / 2; i++) cout << 2 << ' ';
    return 0;
  }
  sort(p.begin(), p.end());
  reverse(p.begin(), p.end());
  vector<int> mark(b);
  if (b < a)
    for (int i = 0; i < b; i++) mark[i] = p[i];
  else
    for (int i = 0; i < b; i++) mark[i] = p[n - i - 1];
  vector<bool> used(n, false);
  int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0;
  for (int i = 0; i < b; i++) {
    if (mark[i] == 1) a1++;
    if (mark[i] == 2) a2++;
    if (mark[i] == 3) a3++;
    if (mark[i] == 4) a4++;
    if (mark[i] == 5) a5++;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (x[i] == 1 && a1 > 0) used[i] = true, a1--;
    if (x[i] == 2 && a2 > 0) used[i] = true, a2--;
    if (x[i] == 3 && a3 > 0) used[i] = true, a3--;
    if (x[i] == 4 && a4 > 0) used[i] = true, a4--;
    if (x[i] == 5 && a5 > 0) used[i] = true, a5--;
  }
  for (int i = 0; i < n; i++)
    if (used[i])
      cout << "2 ";
    else
      cout << "1 ";
  return 0;
}
