#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = static_cast<ll>(1e9) + 7;
const int MAXN = static_cast<int>(1e5) + 17;
int n;
ll X;
ll a[MAXN];
int pos[MAXN];
bitset<1 << 17> s[62];
bool read() {
  if (!(cin >> n)) return false;
  for (ll i = 0; i < (ll)(n); ++i) cin >> a[i];
  return true;
}
bool gauss(vector<int>& p, ll x) {
  for (int b = 0; b < static_cast<int>((p).size()); ++b) {
    for (ll i = 0; i < (ll)(n); ++i) s[b][i] = ((a[i] >> p[b]) & 1);
    s[b][n] = ((x >> p[b]) & 1);
  }
  fill(pos, pos + n, -1);
  for (int i = 0, j = 0; i < static_cast<int>((p).size()) && j < n; ++j) {
    for (int i1 = i; i1 < static_cast<int>((p).size()); ++i1)
      if (s[i1][j] == 1) {
        swap(s[i], s[i1]);
        break;
      }
    if (s[i][j] != 0) {
      for (int i1 = 0; i1 <= static_cast<int>((p).size()); ++i1)
        if (i1 != i && s[i1][j] == 1) s[i1] ^= s[i];
      pos[j] = i++;
    }
  }
  for (ll i = 0; i < (ll)(n); ++i)
    if (pos[i] != -1 && s[pos[i]][n]) x ^= a[i];
  for (int b = 0; b < static_cast<int>((p).size()); ++b)
    if ((x >> p[b]) & 1) return false;
  return true;
}
void solve() {
  for (ll i = 0; i < (ll)(n); ++i) X ^= a[i];
  ll ans = 0;
  for (int bit = 60; bit >= 0; --bit)
    if (((X >> bit) & 1) ^ 1) {
      vector<int> p;
      for (int b = 60; b >= bit; --b)
        if (((X >> b) & 1) ^ 1) p.push_back(b);
      if (gauss(p, (ans | (1ll << bit)))) ans |= (1ll << bit);
    }
  for (int bit = 60; bit >= 0; --bit)
    if ((X >> bit) & 1) {
      vector<int> p;
      for (int b = 60; b >= 0; --b)
        if ((((X >> b) & 1) ^ 1) || b >= bit) p.push_back(b);
      if (!gauss(p, ans)) ans |= (1ll << bit);
    }
  vector<int> p(61);
  iota(p.begin(), p.end(), 0);
  reverse(p.begin(), p.end());
  gauss(p, ans);
  for (ll i = 0; i < (ll)(n); ++i)
    if (pos[i] != -1 && s[pos[i]][n])
      cout << 1 << ' ';
    else
      cout << 2 << ' ';
  cout << '\n';
}
int main() {
  cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::mt19937 rand('S' + 'E' + 'R' + 'E' + 'Z' + 'H' + 'K' + 'A');
  while (read()) solve();
  return 0;
}
