#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
pair<int, int> t[N];
int f[N];
int cmp(pair<int, int> a, pair<int, int> b) {
  return a.first < b.first || (a.first == b.first && a.second > b.second);
}
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    int foo;
    scanf("%d", &foo);
    (t + i)->first = foo;
    (t + i)->second = i;
  }
  if (a == b) {
    for (int i = 0; i < a; ++i) {
      printf("%d", 1);
      if (i + 1 < n) putchar(' ');
    }
    for (int i = 0; i < b; ++i) {
      printf("%d", 2);
      if (i + 1 < n) putchar(' ');
    }
  } else {
    int foo = min(a, b), bar = foo == a ? 1 : 2;
    if (bar == 2)
      sort(t, t + n);
    else
      sort(t, t + n, cmp);
    fill(f, f + n, 3 - bar);
    for (int i = n - 1; i >= n - foo; --i) {
      f[(t + i)->second] = bar;
    }
    for (int i = 0; i < n; ++i) {
      printf("%d", f[i]);
      if (i + 1 < n) putchar(' ');
    }
  }
}
