#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-7;
const long long int m = 1000000007;
void solve() {
  int n, a, b, t, i = 0;
  cin >> n >> a >> b;
  vector<int> marks(n);
  for (int i = 0; i < n; i++) cin >> marks[i];
  vector<int> temp = marks;
  if (a > b)
    sort(temp.begin(), temp.end());
  else
    sort(temp.begin(), temp.end(), greater<int>());
  multiset<int> st;
  t = a;
  while (t--) {
    st.insert(temp[i]);
    i++;
  }
  if (a == b) {
    for (int i = 0; i < a; i++) cout << "1 ";
    for (int i = 0; i < b; i++) cout << "2 ";
    cout << '\n';
    return;
  }
  for (int i = 0; i < n; i++) {
    if (st.find(marks[i]) != st.end()) {
      cout << "1 ";
      st.erase(st.find(marks[i]));
    } else
      cout << "2 ";
  }
  cout << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
