#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
string s, t;
void Print(const string &s) {
  for (int i = 0; i < s.length(); ++i) cout << s[i] << " ";
}
void PrintEqual(int a) {
  for (int i = 0; i < a; ++i) cout << 1 << " ";
  for (int i = 0; i < a; ++i) cout << 2 << " ";
}
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++i) {
    int number;
    cin >> number;
    v.push_back(make_pair(number, i));
  }
  if (a == b) {
    PrintEqual(a);
    return 0;
  }
  sort(v.begin(), v.end());
  s.resize(n);
  t.resize(n);
  if (a > b) {
    for (int i = 0; i < a; ++i) s[v[i].second] = '1';
    for (int i = a; i < n; ++i) s[v[i].second] = '2';
    Print(s);
  } else {
    for (int i = 0; i < n; ++i) v[i].second = -v[i].second;
    sort(v.begin(), v.end());
    for (int i = 0; i < b; ++i) s[-v[i].second] = '2';
    for (int i = b; i < n; ++i) s[-v[i].second] = '1';
    Print(s);
  }
  return 0;
}
