#include <bits/stdc++.h>
using namespace std;
static const int INF = 500000000;
template <class T>
void debug(T a, T b) {
  for (; a != b; ++a) cerr << *a << ' ';
  cerr << endl;
}
int n;
long long int a[100005];
int bits[70][100005];
int m;
int tmp[100005];
int pivot[70];
int ans[100005];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int t = 0; t < 2; ++t)
    for (int i = 61; i >= 0; --i) {
      int sum = 0;
      for (int j = 0; j < n; ++j) {
        tmp[j] = (a[j] >> i & 1);
        sum += tmp[j];
      }
      tmp[n] = 1;
      if (sum % 2 != t) continue;
      for (int j = 0; j < m; ++j)
        if (tmp[pivot[j]])
          for (int k = 0; k < n + 1; ++k) tmp[k] ^= bits[j][k];
      int p = 0;
      while (p < n && tmp[p] == 0) ++p;
      if (p < n) {
        for (int j = 0; j < n + 1; ++j) bits[m][j] = tmp[j];
        pivot[m++] = p;
      }
    }
  for (int i = m - 1; i >= 0; --i) {
    int p = pivot[i];
    ans[p] = bits[i][n];
    for (int j = i + 1; j < m; ++j)
      ans[p] ^= (ans[pivot[j]] * bits[i][pivot[j]]);
  }
  for (int i = 0; i < n; ++i) printf("%d ", ans[i] + 1);
  putchar('\n');
  return 0;
}
