#include//CLOCKS_PER_SEC#define se second#define fi first#define ll long long#define Pii pair #define Pli pair #define ull unsigned long long#define pb push_back#define ALL(x) x.begin(),x.end()#define fio ios::sync_with_stdio(false);cin.tie(0);#define lowbit(x) (x&(-x))#define db double#define N 5010const double Pi=3.14159265;//const int N=2e6+10;const ull base=163;const int INF=0x3f3f3f3f;const int mod=1e9+7;const db eps=1e-10;const db pi=acos(-1);using namespace std;int a[5008];int n;int cy[N],cx[N];bool ev[N],f[N],mt[N];struct node{ int to,nxt;}g[N*1000];int head[N],cnt;void add(int u,int v){ g[cnt].to=v; g[cnt].nxt=head[u]; head[u]=cnt++;}bool check(int x,int y){ int k=0; while(x||y){ if((x&1)!=(y&1)){ k++; } x>>=1; y>>=1; } return k<=1;}bool dfs(int u){ for(int i=head[u];i!=-1;i=g[i].nxt){ if(!f[g[i].to]){ f[g[i].to]=1; if(!cy[g[i].to]||dfs(cy[g[i].to])){ cx[u]=g[i].to; cy[g[i].to]=u; return 1; } } } return 0;}void dfs2(int u){ mt[u]=1; for(int i=head[u];i!=-1;i=g[i].nxt){ if(!f[g[i].to]){ f[g[i].to]=1; if(cx[g[i].to]&&cx[g[i].to]!=u){ mt[g[i].to]=1; dfs2(cx[g[i].to]); } } } return ;}int ans[N];int main(){ memset(head,-1,sizeof(head)); scanf("%d",&n); int k,x; for(int i=1;i<=n;i++){ scanf("%d",&a[i]); x=a[i]; k=0; while(x){ if(x&1){ k++; } x>>=1; } if(k&1){ ev[i]=1; } for(int j=1;j