#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
const int maxs = 61;
long long a[maxn];
int rn, r[maxs][maxn], x[maxn], ind[maxn], is[maxn];
int main() {
  int n;
  scanf("%d", &n);
  long long all = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &a[i]);
    all ^= a[i];
  }
  for (int t = 0; t < 2; ++t) {
    for (int b = maxs - 1; b >= 0; --b) {
      x[n] = 1;
      for (int j = 0; j < n; ++j) {
        x[j] = (a[j] >> b) & 1;
      }
      if (((all >> b) & 1) != t) continue;
      for (int i = 0; i < rn; ++i) {
        if (!x[ind[i]]) continue;
        for (int j = 0; j < n + 1; ++j) {
          x[j] ^= r[i][j];
        }
      }
      int p = 0;
      while (p < n && !x[p]) ++p;
      if (p < n) {
        memcpy(r[rn], x, sizeof(x));
        ind[rn++] = p;
      }
    }
  }
  memset(is, 0, sizeof(is));
  for (int i = rn - 1; i >= 0; --i) {
    int p = ind[i];
    is[p] = r[i][n];
    for (int j = i + 1; j < rn; ++j) {
      is[p] ^= is[ind[j]] * r[i][ind[j]];
    }
  }
  for (int i = 0; i < n; ++i) {
    printf("%d ", ++is[i]);
  }
  puts("");
  return 0;
}
