#include <bits/stdc++.h>
using namespace std;
int n, m, r[64], ans[111111];
long long a[111111], X;
bitset<111111> g, f[64];
void check(bitset<111111> g) {
  for (int i = 0; i < m; i++)
    if (g[r[i]]) g ^= f[i];
  for (int i = 0; i < n; i++)
    if (g[i]) {
      r[m] = i;
      f[m++] = g;
      return;
    }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    X ^= a[i];
  }
  for (int i = 62; i >= 0; i--)
    if (!(X & (1ll << i))) {
      g.reset();
      for (int j = 0; j < n; j++)
        if (a[j] & (1ll << i)) g[j] = 1;
      g[n] = 1;
      check(g);
    }
  for (int i = 62; i >= 0; i--)
    if (X & (1ll << i)) {
      g.reset();
      for (int j = 0; j < n; j++)
        if (a[j] & (1ll << i)) g[j] = 1;
      g[n] = 0;
      check(g);
    }
  for (int i = m - 1; i >= 0; i--) {
    for (int j = 0; j < n; j++)
      if (f[i][j] && ans[j]) f[i].flip(n);
    ans[r[i]] = f[i][n];
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i] ? 1 : 2);
  return 0;
}
