#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n;
int res[N];
int pos[60];
int sum[60];
long long x[N];
bitset<N> a[60];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
  }
  for (int i = 0; i < 60; ++i) {
    for (int j = 0; j < n; ++j) {
      sum[i] ^= x[j] >> i & 1;
    }
  }
  int cnt = 0;
  for (int i = 59; i >= 0; --i) {
    if (sum[i]) continue;
    for (int j = 0; j < n; ++j) {
      a[cnt][j] = x[j] >> i & 1;
    }
    a[cnt++][n] = 1;
  }
  for (int i = 59; i >= 0; --i) {
    if (!sum[i]) continue;
    for (int j = 0; j < n; ++j) {
      a[cnt][j] = x[j] >> i & 1;
    }
    a[cnt++][n] = 1;
  }
  for (int i = 0; i < 60; ++i) {
    pos[i] = n;
    for (int j = 0; j < n; ++j) {
      if (a[i][j]) pos[i] = j;
    }
    if (pos[i] == n) continue;
    for (int j = 0; j < 60; ++j) {
      if (j != i && a[j][pos[i]]) a[j] ^= a[i];
    }
  }
  for (int i = 0; i < 60; ++i) {
    if (pos[i] == n) continue;
    res[pos[i]] = a[i][pos[i]] & a[i][n];
  }
  for (int i = 0; i < n; ++i) cout << res[i] + 1 << ' ';
}
