#include<bits/stdc++.h>
using namespace std;

int n, a[200003], all=0;

int main(){
	cin >> n;
	for (int i=0;i<n;i++){
		cin >> a[i];
		all^=a[i];
	}
	for (int i=0;i<n;i++) cout << (a[i]^all) << " ";
	cout << "\n";
}