#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
template <typename first>
inline first abs(const first& a) {
  return a < 0 ? -a : a;
}
template <typename first>
inline first sqr(const first& a) {
  return a * a;
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-9;
const int INF = 1000 * 1000 * 1000;
const int N = 2 * 100 * 1000 + 13;
int n, a, b;
int c[N];
int cnt[13];
int ans[N];
int need[13];
void solve() {
  if (a < b) {
    for (int i = 5; i > 0; i--) {
      int val = min(cnt[i], a);
      need[i] = val;
      a -= val;
    }
    for (int i = 0; i < int(n); i++)
      if (need[c[i]] > 0)
        ans[i] = 1, need[c[i]]--;
      else
        ans[i] = 2;
  } else if (a > b) {
    for (int i = 1; i <= 5; i++) {
      int val = min(cnt[i], a);
      need[i] = val;
      a -= val;
    }
    for (int i = 0; i < int(n); i++)
      if (need[c[i]] > 0)
        ans[i] = 1, need[c[i]]--;
      else
        ans[i] = 2;
  } else {
    for (int i = 0; i < int(n / 2); i++) ans[i] = 1;
    for (int i = n / 2; i < n; i++) ans[i] = 2;
  }
}
int main() {
  cin >> n;
  cin >> a >> b;
  for (int i = 0; i < int(n); i++) scanf("%d", &c[i]), cnt[c[i]]++;
  solve();
  for (int i = 0; i < int(n); i++) printf("%d ", ans[i]);
  puts("");
  return 0;
}
