#include <bits/stdc++.h>
using namespace std;
vector<bitset<100005> > g;
vector<int> f;
int import[65], n, ans[100005], cnt[100005];
long long d[100005];
void gauss(bitset<100005> A, int B) {
  int m = f.size();
  for (int i = 0; i < m; i++)
    if (A[import[i]]) {
      A ^= g[i];
      B ^= f[i];
    }
  int index = -1;
  for (int i = 1; i <= n; i++)
    if (A[i]) {
      index = i;
      break;
    }
  if (index == -1) return;
  import[m] = index;
  for (int i = 0; i < m; i++)
    if (g[i][index]) g[i] ^= A, f[i] ^= B;
  g.push_back(A);
  f.push_back(B);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &d[i]);
  for (int i = 61; i >= 0; i--)
    for (int j = 1; j <= n; j++) cnt[i] += ((d[j] >> i) & 1);
  for (int i = 61; i >= 0; i--)
    if (cnt[i] && !(cnt[i] & 1)) {
      bitset<100005> A;
      A.reset();
      for (int j = 1; j <= n; j++) A[j] = ((d[j] >> i) & 1);
      gauss(A, 1);
    }
  for (int i = 61; i >= 0; i--)
    if (cnt[i] && (cnt[i] & 1)) {
      bitset<100005> A;
      A.reset();
      for (int j = 1; j <= n; j++) A[j] = ((d[j] >> i) & 1);
      gauss(A, 0);
    }
  int m = f.size();
  for (int i = 0; i < m; i++) ans[import[i]] = f[i];
  for (int i = 1; i <= n; i++) printf("%d ", 2 - ans[i]);
}
