#include <bits/stdc++.h>
using namespace std;
int n, ps[100002], ans[100002];
long long all, a[100002], x[100002], r[62][100002];
void init() {
  scanf("%d\n", &n);
  for (int i = 1; i <= n; ++i) scanf("%I64d", a + i), all ^= a[i];
}
void work() {
  int m = 0, pos = 0;
  for (int i = 60; i >= 0; --i)
    if (!((all >> i) & 1)) {
      for (int j = 1; j <= n; ++j) x[j] = (a[j] >> i) & 1;
      x[n + 1] = 1;
      for (int j = 1; j <= m; ++j) {
        if (x[ps[j]]) {
          for (int k = 1; k <= n + 1; ++k) x[k] ^= r[j][k];
        }
      }
      pos = 0;
      for (int j = 1; j <= n; ++j)
        if (x[j]) {
          pos = j;
          break;
        }
      if (pos == 0) continue;
      ps[++m] = pos;
      for (int j = 1; j <= n + 1; ++j) r[m][j] = x[j];
      for (int j = 1; j < m; ++j) {
        if (r[j][pos]) {
          for (int k = 1; k <= n + 1; ++k) r[j][k] ^= x[k];
        }
      }
    }
  for (int i = 60; i >= 0; --i)
    if ((all >> i) & 1) {
      for (int j = 1; j <= n; ++j) x[j] = (a[j] >> i) & 1;
      x[n + 1] = 0;
      for (int j = 1; j <= m; ++j) {
        if (x[ps[j]]) {
          for (int k = 1; k <= n + 1; ++k) x[k] ^= r[j][k];
        }
      }
      pos = 0;
      for (int j = 1; j <= n; ++j)
        if (x[j]) {
          pos = j;
          break;
        }
      if (pos == 0) continue;
      ps[++m] = pos;
      for (int j = 1; j <= n + 1; ++j) r[m][j] = x[j];
      for (int j = 1; j < m; ++j) {
        if (r[j][pos]) {
          for (int k = 1; k <= n + 1; ++k) r[j][k] ^= x[k];
        }
      }
    }
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= n; ++j)
      if (r[i][j]) {
        ps[i] = j;
        break;
      }
  for (int i = 1; i <= n; ++i) ans[i] = 2;
  for (int i = 1; i <= m; ++i) ans[ps[i]] = 2 - r[i][n + 1];
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
}
int main() {
  init();
  work();
  return 0;
}
