#include <bits/stdc++.h>
using namespace std;
vector<int> m[6];
int res[int(1e5 + 5)];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    int mark;
    cin >> mark;
    m[mark].push_back(i);
  }
  if (a < b) {
    for (int i = 5; i; i--) {
      for (int j = 0; j < m[i].size(); j++) {
        if (a) {
          res[m[i][j]] = 1;
          a--;
        }
      }
    }
    for (int i = 0; i < n; i++)
      if (!res[i]) res[i] = 2;
  } else if (a > b) {
    for (int i = 5; i; i--) {
      for (int j = m[i].size() - 1; j >= 0; j--) {
        if (b) {
          res[m[i][j]] = 2;
          b--;
        }
      }
    }
    for (int i = 0; i < n; i++)
      if (!res[i]) res[i] = 1;
  }
  if (a == b)
    for (int i = 0; i < n; i++)
      if (i < a)
        res[i] = 1;
      else
        res[i] = 2;
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  return 0;
}
