#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, ch;
  while (!isdigit(ch = getchar()))
    ;
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return x;
}
const int MAXN = 100000;
int cnt;
long long Xor;
long long a[MAXN + 1];
int pos[MAXN + 1];
int res[MAXN + 1];
bitset<MAXN + 10> tmp[127];
int main() {
  int n = read();
  for (int i = 1; i <= n; i++) Xor ^= (a[i] = read());
  for (int t = 0; t < 2; t++)
    for (int p = 63; ~p; p--)
      if ((Xor >> p & 1) == t) {
        ++cnt;
        for (int i = 1; i <= n; i++)
          if (a[i] >> p & 1)
            tmp[cnt][i] = 1;
          else
            tmp[cnt][i] = 0;
        tmp[cnt][n + 1] = t ^ 1;
        for (int i = 1; i < cnt; i++)
          if (tmp[cnt][pos[i]]) tmp[cnt] ^= tmp[i];
        for (int i = 1; i <= n; i++)
          if (tmp[cnt][i]) {
            pos[cnt] = i;
            break;
          }
        if (!pos[cnt]) {
          --cnt;
          continue;
        }
        for (int i = 1; i < cnt; i++)
          if (tmp[i][pos[cnt]]) tmp[i] ^= tmp[cnt];
      }
  for (int i = 1; i <= cnt; i++) res[pos[i]] = tmp[i][n + 1];
  for (int i = 1; i <= n; i++) putchar(49 + (res[i] ^ 1)), putchar(' ');
  putchar('\n');
  return 0;
}
