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

const int N = 2e5 + 5;
typedef long long LL;

int n, a[N], sum;

int main() {
	cin>>n;
	for(int i = 1; i <= n; i++) 
		cin>>a[i], sum ^= a[i];
	for(int i = 1; i <= n; i++)
		cout<<(sum^a[i])<<" ";
	return 0;
}