#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int ar[100000];
ofstream fout("out.txt");
bool cmp1(pair<int, int> a, pair<int, int> b) {
  if (a.first < b.first) return true;
  if (a.first > b.first) return false;
  if (a.second < b.second) return true;
  return false;
}
bool cmp2(pair<int, int> a, pair<int, int> b) {
  if (a.first < b.first) return true;
  if (a.first > b.first) return false;
  if (a.second > b.second) return true;
  return false;
}
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++i) {
    int num;
    cin >> num;
    v.push_back(make_pair(num, i));
  }
  vector<pair<int, int> > vv = v;
  if (a != b) {
    sort(v.begin(), v.end(), cmp1);
    sort(vv.begin(), vv.end(), cmp2);
  }
  if (a < b) {
    for (int i = n - 1; i > n - 1 - a; --i) ar[vv[i].second] = 1;
    for (int i = 0; i < b; ++i) ar[vv[i].second] = 2;
  }
  if (a >= b) {
    for (int i = n - 1; i > n - 1 - b; --i) ar[v[i].second] = 2;
    for (int i = 0; i < a; ++i) ar[v[i].second] = 1;
  }
  for (int i = 0; i < n; ++i) cout << ar[i] << " ";
  cout << endl;
}
