#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979;
const double PI2 = 6.28318530717958;
const double PId2 = 1.570796326794895;
inline long long pw(long long n, int p) {
  long long ans = 1;
  for (int i = 0; i < p; i++) ans *= n;
  return ans;
}
inline vector<int> ReadVI(int count) {
  vector<int> arrayname(count);
  for (int i = 0; i < int(count); i++) cin >> arrayname[i];
  return arrayname;
};
inline vector<long long> ReadVlong(int count) {
  vector<long long> arrayname(count);
  for (int i = 0; i < int(count); i++) cin >> arrayname[i];
  return arrayname;
};
inline vector<pair<int, int> > ReadVII(int count) {
  vector<pair<int, int> > arrayname(count);
  for (int i = 0; i < int(count); i++) {
    cin >> arrayname[i].first;
    arrayname[i].second = i;
  }
  return arrayname;
};
const int MOD = 100000000;
const int MAXVALUE = 101;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<pair<int, int> > s, r(n);
  if (a == b) {
    for (int i = 0; i < a; i++) printf("%d ", 1);
    for (int i = 0; i < a; i++) printf("%d ", 2);
    return 0;
  }
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    if (a > b)
      s.push_back(make_pair(t, i));
    else
      s.push_back(make_pair(t, n - i - 1));
  }
  if (a > b)
    sort(s.begin(), s.end());
  else
    sort(s.rbegin(), s.rend());
  for (int i = 0; i < n; i++) {
    r[i].first = s[i].second;
    r[i].second = 2;
  }
  for (int i = 0; i < a; i++) r[i].second = 1;
  if (a > b)
    sort(r.begin(), r.end());
  else
    sort(r.rbegin(), r.rend());
  for (int i = 0; i < n; i++) printf("%d ", r[i].second);
  return 0;
}
