#include <bits/stdc++.h>
int diru[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dirv[] = {-1, 0, 1, -1, 1, -1, 0, 1};
using namespace std;
class Debugger {
 public:
  Debugger(const string& _separator = " ")
      : first(true), separator(_separator) {}
  template <typename ObjectType>
  Debugger& operator,(const ObjectType& v) {
    if (!first) cerr << separator;
    cerr << v;
    first = false;
    return *this;
  }
  ~Debugger() { cerr << endl; }

 private:
  bool first;
  string separator;
};
template <typename T1, typename T2>
inline ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  return os << "(" << p.first << "," << p.second << ")";
}
template <typename T>
inline ostream& operator<<(ostream& os, const vector<T>& v) {
  bool first = true;
  os << "{";
  for (unsigned int i = 0; i < v.size(); i++) {
    if (!first) os << ",";
    os << v[i];
    first = false;
  }
  return os << "}";
}
template <typename T>
inline ostream& operator<<(ostream& os, const set<T>& v) {
  bool first = true;
  os << "{";
  for (typename set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii) {
    if (!first) os << ",";
    os << *ii;
    first = false;
  }
  return os << "}";
}
template <typename T1, typename T2>
inline ostream& operator<<(ostream& os, const map<T1, T2>& v) {
  bool first = true;
  os << "{";
  for (typename map<T1, T2>::const_iterator ii = v.begin(); ii != v.end();
       ++ii) {
    if (!first) os << ",";
    os << *ii;
    first = false;
  }
  return os << "}";
}
template <class T>
T sq(T n) {
  return n * n;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
bool inside(T a, T b, T c) {
  return a <= b && b <= c;
}
template <class T>
void setmax(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
bool com(pair<int, int> x, pair<int, int> y) {
  return x.first < y.first || (x.first == y.first && x.second > y.second);
}
pair<int, int> in[100010];
int ans[100010];
int main() {
  int n, T, t = 1, m, i, j, k, a, b;
  {
    scanf("%d", &n);
    scanf("%d", &a);
    scanf("%d", &b);
    for (i = 0; i < n; i++) {
      scanf("%d", &in[i].first);
      in[i].second = i;
    }
    if (a == b) {
      for (i = 0; i < a; i++) {
        if (i) printf(" ");
        printf("%d", 1);
      }
      for (i = 0; i < b; i++) {
        printf(" ");
        printf("%d", 2);
      }
      puts("");
      return 0;
    } else if (a > b) {
      sort(in, in + n);
      for (i = 0; i < a; i++) {
        ans[in[i].second] = 1;
      }
      for (i = a; i < n; i++) {
        ans[in[i].second] = 2;
      }
    } else {
      sort(in, in + n, com);
      for (i = 0; i < b; i++) {
        ans[in[i].second] = 2;
      }
      for (i = b; i < n; i++) {
        ans[in[i].second] = 1;
      }
    }
    for (i = 0; i < n; i++) {
      if (i) printf(" ");
      printf("%d", ans[i]);
    }
    puts("");
  }
  return 0;
}
