#include <bits/stdc++.h>
using namespace std;
bitset<100050> a[62];
long long v[100050], ans, a2[62];
int n, st, s[62], Le[62], sg[62];
bool Ans[100050];
inline long long Read() {
  long long x = 0;
  char y;
  do y = getchar();
  while (y < '0' || y > '9');
  do x = x * 10 + y - '0', y = getchar();
  while (y >= '0' && y <= '9');
  return x;
}
void Insert(int x) {
  a[++st].reset();
  for (int i = 0; i < n; i++)
    if (v[i + 1] & a2[x]) a[st][i] = true;
  a[st][n] = true;
  while (true) {
    bool flag = false;
    int le = -1;
    for (int i = 0; i < n && le == -1; i++) le = a[st][i] ? i : le;
    if (le == -1) {
      st--;
      return;
    }
    for (int i = 1; i < st; i++)
      if (Le[i] == le) a[st] = a[st] ^ a[i], flag = true;
    if (!flag) {
      Le[st] = le;
      return;
    }
  }
}
inline bool cmp(int x, int y) { return Le[x] > Le[y]; }
void GetAns() {
  for (int i = 1; i <= st; i++) sg[i] = i;
  sort(sg + 1, sg + st + 1, cmp);
  int now = n;
  for (int i = 1; i <= st; i++) {
    bool flag = false;
    for (int j = now; j < n; j++) flag ^= a[sg[i]][j] & Ans[j];
    Ans[Le[sg[i]]] = flag ^ a[sg[i]][n];
    now = Le[sg[i]];
  }
  return;
}
int main() {
  n = Read();
  a2[0] = 1;
  for (int i = 1; i < 62; i++) a2[i] = a2[i - 1] << 1;
  for (int i = 1; i <= n; i++) {
    v[i] = Read();
    for (int j = 0; j < 62; j++)
      if (v[i] & a2[j]) s[j]++;
  }
  for (int i = 62 - 1; i >= 0; i--)
    if (s[i] && (s[i] & 1) == 0) Insert(i);
  for (int i = 62 - 1; i >= 0; i--)
    if (s[i] & 1) Insert(i);
  GetAns();
  for (int i = 0; i < n; i++) printf("%d ", Ans[i] + 1);
  puts("");
  return 0;
}
