#include <bits/stdc++.h>
using namespace std;
struct mark {
  int mar;
  int pos;
  int who;
  bool operator<(const mark &ot) const { return pos < ot.pos; }
};
mark s[100010];
bool cmp1(const mark &a, const mark &b) {
  return a.mar > b.mar || (a.mar == b.mar && a.pos > b.pos);
}
bool cmp2(const mark &a, const mark &b) {
  return a.mar > b.mar || (a.mar == b.mar && a.pos < b.pos);
}
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> s[i].mar;
    s[i].pos = i + 1;
  }
  if (a == b) {
    for (int i = 0; i < n; i++) {
      if (i < n / 2)
        cout << "1 ";
      else
        cout << "2 ";
    }
    cout << endl;
    return 0;
  }
  if (b < a) {
    sort(s, s + n, cmp1);
  } else {
    sort(s, s + n, cmp2);
  }
  int have = 0;
  for (int i = 0; i < n; i++) {
    if (b < a) {
      if (have == b) break;
      s[i].who = 2;
      ++have;
    } else {
      if (have == a) break;
      s[i].who = 1;
      ++have;
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i].who == 0) {
      if (b < a)
        s[i].who = 1;
      else
        s[i].who = 2;
    }
  }
  sort(s, s + n);
  for (int i = 0; i < n; i++) cout << s[i].who << ' ';
  return 0;
}
