#include <bits/stdc++.h>
using namespace std;
vector<int> c[10];
int main() {
  int n;
  cin >> n;
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    int p;
    cin >> p;
    c[p].push_back(i);
  }
  vector<pair<int, int> > m;
  int f[n];
  if (a == b) {
    for (int i = 0; i < a; i++) cout << 1 << ' ';
    for (int i = a; i < n; i++) cout << 2 << ' ';
    return 0;
  }
  if (a < b) {
    for (int i = 1; i < 6; i++)
      if (c[i].size())
        for (int j = c[i].size() - 1; j > -1; j--)
          m.push_back(make_pair(i, c[i][j]));
    for (int i = 0; i < b; i++) f[m[i].second] = 2;
    for (int i = b; i < n; i++) f[m[i].second] = 1;
  }
  if (a > b) {
    for (int i = 1; i < 6; i++)
      for (int j = 0; j < c[i].size(); j++) m.push_back(make_pair(i, c[i][j]));
    for (int i = 0; i < a; i++) f[m[i].second] = 1;
    for (int i = a; i < n; i++) f[m[i].second] = 2;
  }
  for (int i = 0; i < n; i++) cout << f[i] << ' ';
}
