#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
int a, b, i, d[1011000], j, k, n, m, timer = 0, l, r, x, y;
int c[1011000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0;
pair<int, int> p[100100];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> a >> b;
  for (i = 0; i < n; i++) {
    cin >> l;
    if (b < a)
      p[i] = make_pair(l, i);
    else
      p[i] = make_pair(l, i * -1);
  }
  sort(p, p + n);
  for (i = n - 1; i >= n - min(a, b); i--) {
    if (a > b)
      c[abs(p[i].second)] = 2;
    else
      c[abs(p[i].second)] = 1;
  }
  for (i = 0; i < n; i++) {
    if (a == b) {
      if (i < a)
        cout << "1 ";
      else
        cout << "2 ";
    } else {
      if (a > b && c[i] == 0)
        c[i] = 1;
      else if (a < b && c[i] == 0)
        c[i] = 2;
      cout << c[i] << " ";
    }
  }
  return 0;
}
