#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 5000, MXB = 64;
template <class T>
inline bool has(T x, int p) {
  return (x >> p) & 1;
}
struct number_t {
  unsigned long long v;
  vector<int> okr;
  int id;
  number_t& operator=(const number_t& b) {
    if (this == &b) return *this;
    v = b.v;
    id = b.id;
    okr = b.okr;
    return *this;
  }
  number_t& operator^=(const number_t& b) {
    vector<int> tmp;
    v ^= b.v;
    tmp.clear();
    tmp.resize(okr.size() + b.okr.size());
    tmp.resize(set_symmetric_difference(okr.begin(), okr.end(), b.okr.begin(),
                                        b.okr.end(), tmp.begin()) -
               tmp.begin());
    okr = tmp;
    return *this;
  }
} A[N];
unsigned long long edt[N];
int n, ans[N], ndpos[MXB + 5];
int main() {
  scanf("%d", &n);
  int _nbak = n;
  unsigned long long ttot = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%I64u", &A[i].v);
    ttot ^= A[i].v;
    edt[i] = A[i].v;
    A[i].id = i;
    A[i].okr.reserve(MXB);
    A[i].okr.push_back(i);
  }
  int cp = MXB - 1;
  for (int i = MXB - 1; i >= 0; --i)
    if (!has(ttot, i)) ndpos[i] = cp--;
  for (int i = MXB - 1; i >= 0; --i)
    if (has(ttot, i)) ndpos[i] = cp--;
  for (int i = 0; i < n; ++i) {
    vector<int> okr;
    okr.clear();
    for (int j = 0; j < MXB; ++j)
      if (has(A[i].v, j)) okr.push_back(j);
    A[i].v = 0;
    for (size_t j = 0; j < okr.size(); ++j) A[i].v |= 1ULL << ndpos[okr[j]];
  }
  for (int i = 0, j, k, l; i < MXB; ++i) {
    for (k = i; k < n; ++k)
      if (has(A[k].v, MXB - 1 - i)) break;
    if (k == n)
      swap(A[i], A[n++]);
    else {
      if (i != k) swap(A[i], A[k]);
      for (j = i + 1; j < n; ++j)
        if (has(A[j].v, MXB - 1 - i)) A[j] ^= A[i];
    }
  }
  number_t res;
  res.v = 0;
  res.okr.clear();
  res.okr.reserve(MXB);
  unsigned long long t0 = 0, t1 = 0;
  for (int i = 0; i < MXB; ++i) {
    if (has(res.v, MXB - 1 - i) || !has(A[i].v, MXB - 1 - i)) continue;
    res ^= A[i];
  }
  for (size_t i = 0; i < res.okr.size(); ++i) {
    ans[res.okr[i]] = 1;
    t0 ^= edt[res.okr[i]];
  }
  for (int i = 0; i < _nbak; ++i)
    if (!ans[i]) t1 ^= edt[i];
  for (int i = 0; i < _nbak; ++i) printf("%d ", ++ans[i]);
  return 0;
}
