#include <bits/stdc++.h>
using namespace std;
const int N = 100005, LG = 62;
int n, M[N];
long long sum, A[N], T[LG];
vector<int> P, G;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &A[i]), sum ^= A[i];
  for (int i = LG - 1; i >= 0; i--)
    if (!((sum >> i) & 1LL)) P.push_back(i);
  for (int i = LG - 1; i >= 0; i--)
    if ((sum >> i) & 1LL) P.push_back(i);
  reverse(P.begin(), P.end());
  for (int i = 1; i <= n; i++) {
    long long a = A[i];
    A[i] = 0;
    for (int j = 0; j < LG; j++)
      if ((a >> P[j]) & 1LL) A[i] |= (1LL << j);
    long long tt = A[i];
    for (int &id : G) tt = min(tt, tt ^ A[id]);
    if (tt) {
      int d = (int)G.size();
      T[d] |= (1LL << d);
      G.push_back(i);
      for (int j = 0; j < d; j++)
        if (A[i] > (A[i] ^ A[G[j]])) {
          A[i] ^= A[G[j]];
          T[d] ^= T[j];
        }
    }
  }
  long long X = 0;
  for (int i = LG - 1; i >= 0; i--) {
    long long Y = X ^ (1LL << i);
    for (int id : G) Y = min(Y, Y ^ A[id]);
    if (Y < (1LL << i)) X ^= (1LL << i);
  }
  long long res = 0;
  for (int i = 0; i < (int)G.size(); i++)
    if (X > (X ^ A[G[i]])) X ^= A[G[i]], res ^= T[i];
  assert(X == 0);
  for (int i = 0; i < (int)G.size(); i++)
    if ((res >> i) & 1LL) M[G[i]] = 1;
  for (int i = 1; i <= n; i++) printf("%d ", M[i] + 1);
  return 0;
}
