#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
  	ll N;
  	cin>>N;
  	vector<ll> v(N);
  	ll sum=0;
  	for(ll i=0;i<N;i++){
  		cin>>v[i];
  		sum^=v[i];
  	}
    for(int i=0;i<N;i++){
    	cout<<(sum^v[i])<<" ";
    }
   
}