#include <bits/stdc++.h>
using namespace std;
vector<int> v[6];
const int N = 200004;
int ans[N], t, n, a, b;
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t);
    v[t].push_back(i);
  }
  if (a == b) {
    for (int i = 1; i <= n / 2; i++) ans[i] = 1;
    for (int i = n; i > n / 2; i--) ans[i] = 2;
  } else if (a < b) {
    for (int i = 5; i > 0; i--)
      for (int j = 0; j < v[i].size() && a > 0; j++, a--) ans[v[i][j]] = 1;
  } else {
    for (int i = 1; i < 6; i++)
      for (int j = 0; j < v[i].size() && a > 0; j++, a--) ans[v[i][j]] = 1;
  }
  for (int i = 1; i <= n; i++)
    if (ans[i] == 0) ans[i] = 2;
  for (int i = 1; i <= n; i++) printf("%d%c", ans[i], " \n"[i == n]);
}
