#include <bits/stdc++.h>
using namespace std;
int n;
long long a[111111];
int c[66], cn, d[66][111111], x[111111], res[111111];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%lld", &a[i]);
  for (int t = 0; t < 2; ++t) {
    for (int j = 60; j >= 0; --j) {
      int cnt = 0;
      for (int i = 0; i < n; ++i) {
        x[i] = (a[i] >> j) & 1;
        cnt += x[i];
      }
      if ((cnt & 1) != t) continue;
      x[n] = 1;
      for (int k = 0; k < cn; ++k)
        if (x[c[k]]) {
          for (int i = 0; i <= n; ++i) x[i] ^= d[k][i];
        }
      int p = 0;
      while (p < n && !x[p]) ++p;
      if (p < n) {
        memcpy(d[cn], x, sizeof(int) * (n + 1));
        c[cn++] = p;
      }
    }
  }
  for (int j = cn - 1; j >= 0; --j) {
    int p = c[j];
    res[p] = d[j][n];
    for (int k = j + 1; k < cn; ++k) {
      int pp = c[k];
      res[p] ^= (d[j][pp] & res[pp]);
    }
  }
  for (int i = 0; i < n; ++i) {
    if (i > 0) putchar(' ');
    printf("%d", res[i] + 1);
  }
  puts("");
  return 0;
}
