#include <bits/stdc++.h>
using namespace std;
struct dbl {
  int a, b;
};
bool _less(dbl a, dbl b) {
  if (a.a != b.a) return a.a < b.a;
  return a.b < b.b;
}
void ret(string s) {
  cout << s;
  exit(0);
}
int main() {
  int n, k, p, m = 1, ans[100000] = {0}, pos, p2;
  dbl a[100000];
  cin >> n >> k >> p;
  for (int i = 0; i < n; i++) cin >> a[i].a;
  for (int i = 0; i < n; i++) a[i].b = i;
  if (k == p) {
    for (int i = 0; i < k; i++) cout << "1 ";
    for (int i = 0; i < p; i++) cout << "2 ";
    return 0;
  }
  sort(a, a + n, _less);
  if (p <= k) {
    for (int i = 0; i < k; i++) ans[a[i].b] = 1;
    for (int i = 0; i < n; i++)
      if (ans[i] != 0)
        cout << "1 ";
      else
        cout << "2 ";
    return 0;
  } else {
    for (int i = 0; i < p; i++) ans[a[i].b] = 1;
    m = a[p - 1].a;
    pos = p - 1;
    while (pos >= 0 && a[pos - 1].a == m) pos--;
    p2 = p;
    while (a[p2].a == m && p2 < n) {
      ans[a[pos].b] = 0;
      ans[a[p2].b] = 1;
      p2++;
      pos++;
    }
    for (int i = 0; i < n; i++)
      if (ans[i] == 0)
        cout << "1 ";
      else
        cout << "2 ";
  }
  return 0;
}
