#include <bits/stdc++.h>
using namespace std;
ifstream fin("data.in");
ofstream fout("data.out");
int cmp(pair<int, int> a, pair<int, int> b) {
  return a.first > b.first || (a.first == b.first && a.second < b.second);
}
int main(int argc, char *argv[]) {
  int n, a, b;
  bool ItsAllTheSame = true;
  vector<pair<int, int> > marks;
  vector<int> res;
  cin >> n >> a >> b;
  marks.resize(n);
  for (unsigned long long i = 0; i < n; i++) {
    cin >> marks[i].first;
    marks[i].second = i;
    if (i > 0 && marks[i].first != marks[i - 1].first) ItsAllTheSame = false;
  }
  if (a == b || ItsAllTheSame) {
    res.resize(n, 2);
    for (unsigned long long i = 0; i < a; i++) res[i] = 1;
  } else if (a < b) {
    sort(marks.begin(), marks.end(), cmp);
    res.resize(n, 2);
    for (unsigned long long i = 0; i < a; i++) res[marks[i].second] = 1;
  } else {
    sort(marks.begin(), marks.end());
    reverse(marks.begin(), marks.end());
    res.resize(n, 1);
    for (unsigned long long i = 0; i < b; i++) res[marks[i].second] = 2;
  }
  for (unsigned long long i = 0; i < n; i++) cout << res[i] << " ";
  cout << endl;
  return 0;
}
