#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  if (a >= mod) a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a;
    if (res >= mod) res %= mod;
    a = a * a;
    if (a >= mod) a %= mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
vector<int> pos[6];
int ans[100005];
int lef, pt;
void solve(int val) {
  pt = pos[val].size();
  while (lef && pt) {
    ans[pos[val][pt - 1]] = 2;
    pt--;
    lef--;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  ;
  int i, j, t, n, a, b, x, y;
  cin >> n >> a >> b;
  for (i = 1; i <= n; i++) {
    cin >> y;
    pos[y].push_back(i);
    ans[i] = 1;
  }
  lef = b;
  if (b < a)
    for (i = 5; i >= 1; i--) solve(i);
  else if (b == a)
    for (i = a + 1; i <= n; i++) ans[i] = 2;
  else
    for (i = 1; i <= 5; i++) solve(i);
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
