#include <bits/stdc++.h>
using namespace std;
int cnt, CNT, m[105][105], ans[100005], n, i, j;
long long sum, A[100005], B[100005], now;
struct node {
  long long x;
  int y;
} p[105];
bool OK() {
  int now = 1;
  for (int i = 1; i <= cnt; i++) {
    int j;
    for (j = now; j <= CNT; j++)
      if (m[j][i]) break;
    if (j == CNT + 1) continue;
    for (int k = i; k <= cnt + 1; k++) swap(m[j][k], m[now][k]);
    for (j = now + 1; j <= CNT; j++)
      if (m[j][i])
        for (int k = i; k <= cnt + 1; k++) m[j][k] ^= m[now][k];
    now++;
  }
  for (int i = now; i <= CNT; i++)
    if (m[i][cnt + 1] == 1) return false;
  return true;
}
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%I64d", &A[i]);
    sum ^= A[i];
    now = A[i];
    for (j = 62; j >= 0; j--)
      if (A[i] & ((long long)1 << j)) {
        if (B[j])
          A[i] ^= B[j];
        else {
          B[j] = A[i];
          p[++cnt].x = now;
          p[cnt].y = i;
          break;
        }
      }
  }
  for (i = 62; i >= 0; i--)
    if (!(sum & ((long long)1 << i))) {
      CNT++;
      for (j = 1; j <= cnt; j++)
        if (p[j].x & ((long long)1 << i)) m[CNT][j] = 1;
      m[CNT][cnt + 1] = 1;
      if (!OK()) m[CNT][cnt + 1] = 0;
    }
  for (i = 62; i >= 0; i--)
    if ((sum & ((long long)1 << i))) {
      CNT++;
      for (j = 1; j <= cnt; j++)
        if (p[j].x & ((long long)1 << i)) m[CNT][j] = 1;
      m[CNT][cnt + 1] = 0;
      if (!OK()) m[CNT][cnt + 1] = 1;
    }
  OK();
  for (i = cnt; i >= 1; i--) {
    for (j = i + 1; j <= cnt; j++)
      if (m[i][j]) m[i][cnt + 1] ^= ans[p[j].y];
    ans[p[i].y] = m[i][cnt + 1];
  }
  for (i = 1; i <= n; i++)
    if (ans[i] == 1)
      printf("1 ");
    else
      printf("2 ");
  return 0;
}
