#include <bits/stdc++.h>
using namespace std;
template <class _T>
inline _T sqr(const _T& x) {
  return x * x;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
int n, m, k;
int a[102400];
int b[102400];
int c[10];
int ans[1024000];
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  memset((c), 0, sizeof(c));
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &a[i]);
    c[b[i] = a[i]]++;
  }
  sort(b, b + n);
  if (m == k) {
    for (int i = 0; i < (int)(m); i++) {
      ans[i] = 1;
    }
    for (int i = 0; i < (int)(k); i++) {
      ans[m + i] = 2;
    }
  } else {
    if (m > k) {
      int tt = 1;
      int sum = m;
      while (sum >= c[tt]) sum -= c[tt++];
      for (int i = 0; i < (int)(n); i++) {
        if (a[i] < tt)
          ans[i] = 1;
        else if (a[i] > tt)
          ans[i] = 2;
        else if (sum)
          ans[i] = 1, sum--;
        else
          ans[i] = 2;
      }
    } else {
      int tt = 5;
      int sum = m;
      while (sum > c[tt]) sum -= c[tt--];
      sum = c[tt] - sum;
      for (int i = (n)-1; i >= 0; i--) {
        if (a[i] < tt)
          ans[i] = 2;
        else if (a[i] > tt)
          ans[i] = 1;
        else if (sum)
          ans[i] = 2, sum--;
        else
          ans[i] = 1;
      }
    }
  }
  for (int i = 0; i < (int)(n); i++) {
    if (i) putchar(' ');
    printf("%d", ans[i]);
  }
  puts("");
  return 0;
}
