#include <bits/stdc++.h>
using namespace std;
bool check[101];
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > point(n);
  for (__typeof(n) i = 0; i < (n); ++i)
    cin >> point[i].first, point[i].second = i;
  sort(point.begin(), point.end());
  for (__typeof(n) i = 0; i < (n); ++i) check[point[i].second] = i & 1;
  for (__typeof(n) i = 0; i < (n); ++i) cout << check[i] << ' ';
}
