#include <bits/stdc++.h>
using namespace std;
void Weapons19() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
bool cmp(pair<long long, long long> &p1, pair<long long, long long> &p2) {
  if (p1.first < p2.first) return 1;
  if (p1.first == p2.first) return (p1.second > p2.second);
  return 0;
}
int32_t main() {
  Weapons19;
  long long n;
  cin >> n;
  long long a, b;
  cin >> a >> b;
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  if (a == b) {
    for (long long i = 0; i < a; i++) cout << "1 ";
    for (long long i = 0; i < b; i++) cout << "2 ";
    return 0;
  }
  map<long long, long long> m;
  if (a > b) {
    sort(v.begin(), v.end());
    for (long long i = 0; i < a; i++) m[v[i].second] = 1;
    for (long long i = a; i < n; i++) m[v[i].second] = 2;
  } else {
    sort(v.begin(), v.end(), cmp);
    for (long long i = 0; i < b; i++) m[v[i].second] = 2;
    for (long long i = b; i < n; i++) m[v[i].second] = 1;
  }
  for (auto z : m) cout << z.second << " ";
}
