#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
template <typename T>
inline T sqr(T a) {
  return a * a;
}
template <typename T>
inline void relax_min(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
inline void relax_max(T &a, T b) {
  if (b > a) a = b;
}
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
const long double EPS = 1E-8;
const long double PI = 3.1415926535897932384626433832795;
int t[100000];
pair<int, int> q[100000];
int res[100000];
int dp[100000][2];
int cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) return a.second > b.second;
  return a.first < b.first;
}
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0, _n(n); i < _n; i++) cin >> t[i];
  for (int i = 0, _n(a); i < _n; i++) {
    q[i] = make_pair(t[i] * (a - b), i);
    res[i] = 1;
  }
  for (int i = 0, _n(b); i < _n; i++) {
    q[a + i] = make_pair(t[a + i] * (b - a), (a + i));
    res[a + i] = 2;
  }
  sort(q, q + a);
  sort(q + a, q + n, cmp);
  for (int i = 0, _n(min(a, b)); i < _n; i++) {
    int delta = q[a - 1 - i].first + q[n - 1 - i].first;
    if (delta > 0) {
      int t1 = q[a - 1 - i].second;
      int t2 = q[n - 1 - i].second;
      res[t1] = 2;
      res[t2] = 1;
    }
  }
  for (int i = 0, _n(n); i < _n; i++) cout << res[i] << " ";
}
int main() {
  solve();
  return 0;
}
