#include <bits/stdc++.h>
using namespace std;
int n, m;
struct data {
  int x, num, ans;
} a[101];
inline bool cmp1(data a, data b) { return a.x < b.x; }
inline bool cmp2(data a, data b) { return a.num < b.num; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].x);
    a[i].num = i;
  }
  sort(a + 1, a + n + 1, cmp1);
  for (int i = 1; i <= n; i++) a[i].ans = (i & 1);
  sort(a + 1, a + n + 1, cmp2);
  for (int i = 1; i <= n; i++) printf("%d ", a[i].ans);
  return 0;
}
