#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n,m; struct POINT { int x,c,id; }point[110]; bool cmp1(POINT a,POINT b) { return a.x<b.x; } bool cmp2(POINT a,POINT b) { return a.id<b.id; } int main() { scanf("%d%d",&n,&m); for(int i=0;i<n;i++) { scanf("%d",&point[i].x); point[i].id=i; } for(int i=0;i<m;i++) scanf("%*d%*d"); sort(point,point+n,cmp1); for(int i=0;i<n;i++) { point[i].c=i%2; } sort(point,point+n,cmp2); for(int i=0;i<n;i++) { printf("%d ",point[i].c); } putchar(10); return 0; }