#include <bits/stdc++.h>
using namespace std;
int n;
long long nu;
bitset<100100> a[66], g[66];
int tot;
int pos[100100];
int ans[100100];
long long s;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &nu);
    s ^= nu;
    for (int j = 0; j <= 60; j++)
      if (nu >> j & 1) a[j][i] = 1;
  }
  for (int j = 0; j < 2; ++j)
    for (int i = 60; ~i; --i)
      if ((s >> i & 1) == j) {
        g[++tot] = a[i];
        g[tot][n + 1] = !j;
        pos[tot] = 0;
        for (int k = 1; k < tot; ++k)
          if (g[tot][pos[k]]) g[tot] ^= g[k];
        for (int k = 1; k <= n; ++k)
          if (g[tot][k]) {
            pos[tot] = k;
            break;
          }
        if (!pos[tot]) {
          tot--;
          continue;
        }
        for (int k = 1; k < tot; ++k)
          if (g[k][pos[tot]]) g[k] ^= g[tot];
      }
  for (int i = 1; i <= tot; ++i) ans[pos[i]] = g[i][n + 1];
  for (int i = 1; i <= n; ++i) printf("%d ", 2 - ans[i]);
  puts("");
  return 0;
}
