#include <bits/stdc++.h>
using namespace std;
struct node {
  int score;
  int index;
};
struct cmp1 {
  bool operator()(const node& n1, const node& n2) const {
    return n1.score != n2.score ? n1.score < n2.score : (n1.index < n2.index);
  }
};
struct cmp2 {
  bool operator()(const node& n1, const node& n2) const {
    return n1.score != n2.score ? n1.score < n2.score : (n1.index > n2.index);
  }
};
int ans[100000];
int main() {
  int n;
  int a, b;
  scanf("%d%d%d", &n, &a, &b);
  if (a == b) {
    for (int i = 0; i < n; i++)
      printf("%d%c", 1 + (i >= a), i == n - 1 ? '\n' : ' ');
    return 0;
  } else if (a < b) {
    priority_queue<node, vector<node>, cmp2> q;
    for (int i = 0; i < n; i++) {
      node nn;
      scanf("%d", &nn.score);
      nn.index = i;
      q.push(nn);
    }
    for (int i = 0; i < a; i++) {
      node nn = q.top();
      q.pop();
      ans[nn.index] = 1;
    }
    for (int i = 0; i < n; i++) {
      printf("%d%c", ans[i] == 1 ? 1 : 2, i == n - 1 ? '\n' : ' ');
    }
  } else {
    priority_queue<node, vector<node>, cmp1> q;
    for (int i = 0; i < n; i++) {
      node nn;
      scanf("%d", &nn.score);
      nn.index = i;
      q.push(nn);
    }
    for (int i = 0; i < b; i++) {
      node nn = q.top();
      q.pop();
      ans[nn.index] = 2;
    }
    for (int i = 0; i < n; i++) {
      printf("%d%c", ans[i] == 2 ? 2 : 1, i == n - 1 ? '\n' : ' ');
    }
  }
  return 0;
}
