#include <bits/stdc++.h>
using namespace std;
void dbg_out() { cerr << "\b\b]\n"; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << H << ", ";
  dbg_out(T...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> A(n);
  for (int &i : A) cin >> i;
  vector<int> indx(n);
  iota(indx.begin(), indx.end(), 0);
  vector<int> ans;
  if (a == b) {
    ans = vector<int>(n, 2);
    for (int i = 0; i < a; ++i) ans[i] = 1;
  } else if (a < b) {
    ans = vector<int>(n, 2);
    sort(indx.begin(), indx.end(), [&](int x, int y) {
      if (A[x] != A[y]) return A[x] < A[y];
      return x > y;
    });
    for (int i = 0; i < a; ++i) {
      ans[indx[n - i - 1]] = 1;
    }
  } else {
    ans = vector<int>(n, 1);
    sort(indx.begin(), indx.end(), [&](int x, int y) {
      if (A[x] != A[y]) return A[x] < A[y];
      return x < y;
    });
    for (int i = 0; i < b; ++i) {
      ans[indx[n - i - 1]] = 2;
    }
  }
  for (int i : ans) cout << i << ' ';
  return 0;
}
