#include <bits/stdc++.h>
using namespace std;
int pos[105];
vector<pair<int, int> > a;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int coord;
    cin >> coord;
    a.push_back(make_pair(coord, i));
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < (int)a.size(); i++) pos[a[i].second] = i;
  for (int i = 0; i < n; i++) cout << pos[i] % 2 << " ";
  return 0;
}
