#include <bits/stdc++.h>
using namespace std;
const int SIZEN = 100010;
const int SIZEH = 70;
int bitcnt(long long n) {
  if (n == 0) return 1;
  int ans = 0;
  while (n) {
    ans++;
    n /= 2;
  }
  return ans;
}
int N, M = 0;
long long S;
long long HA[SIZEN];
bool Gauss_Jordan(bitset<SIZEN> A[SIZEH], int h, int n, bool b[SIZEN]) {
  static int pivot[SIZEH];
  int i, r = 0;
  for (i = 0; i < h; i++) {
    while (r < n) {
      bool flag = false;
      for (int k = i; k < h; k++) {
        if (A[k][r] == 1) {
          flag = true;
          pivot[i] = r;
          swap(A[k], A[i]);
          break;
        }
      }
      if (flag) break;
      r++;
    }
    if (r == n) break;
    for (int t = 0; t < h; t++) {
      if (t == i) continue;
      if (A[t][r] == 1) A[t] ^= A[i];
    }
  }
  memset(b, 0, sizeof(b));
  for (int t = i; t < h; t++)
    if (A[t][n] == 1) return false;
  for (int t = 0; t < i; t++) b[pivot[t]] = A[t][n];
  return true;
}
bitset<SIZEN> A[SIZEH], A1[SIZEH];
bool b[SIZEN];
bool test(int h, int k, int p) {
  memcpy(A1, A, sizeof(A));
  A1[h][N] = p;
  for (int i = 0; i < N; i++) A1[h][i] = (HA[i] >> k) & 1;
  if (Gauss_Jordan(A1, h + 1, N, b)) {
    memcpy(A, A1, sizeof(A1));
    return true;
  }
  return false;
}
void work(void) {
  int h = 0;
  for (int i = M - 1; i >= 0; i--) {
    if (((S >> i) & 1) == 0) {
      if (!test(h, i, 1)) test(h, i, 0);
      h++;
    }
  }
  for (int i = M - 1; i >= 0; i--) {
    if (((S >> i) & 1) == 1) {
      if (!test(h, i, 0)) test(h, i, 1);
      h++;
    }
  }
  for (int i = 0; i < N; i++) printf("%d ", 2 - b[i]);
  printf("\n");
}
void read(void) {
  scanf("%d", &N);
  S = 0;
  for (int i = 0; i < N; i++) {
    scanf("%I64d", &HA[i]);
    M = max(M, bitcnt(HA[i]));
    S ^= HA[i];
  }
}
int main() {
  read();
  work();
  return 0;
}
