#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch - '0' < 0 || ch - '0' > 9) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch - '0' >= 0 && ch - '0' <= 9) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
bitset<100010> f[65], a[65];
int n;
int pos[65];
int ans[100010];
int main() {
  n = read();
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    long long x = read();
    sum ^= x;
    for (int j = 0; j <= 60; j++) {
      if (((x >> j) & 1) == 1) f[j][i] = 1;
    }
  }
  int tot = 0;
  for (int j = 0; j <= 1; j++) {
    for (int k = 60; k >= 0; k--) {
      if (((sum >> k) & 1) == j) {
        a[++tot] = f[k];
        a[tot][n + 1] = (j ^ 1);
        pos[tot] = 0;
        for (int i = 1; i < tot; i++) {
          if (a[tot][pos[i]]) a[tot] ^= a[i];
        }
        for (int i = 1; i <= n; i++) {
          if (a[tot][i]) {
            pos[tot] = i;
            break;
          }
        }
        if (pos[tot] == 0) {
          tot--;
          continue;
        }
        for (int i = 1; i < tot; i++) {
          if (a[i][pos[tot]]) a[i] ^= a[tot];
        }
      }
    }
  }
  for (int i = 1; i <= tot; i++) ans[pos[i]] = a[i][n + 1];
  for (int i = 1; i <= n; i++) printf("%d ", 2 - ans[i]);
  puts("");
  return 0;
}
