#include<bits/stdc++.h>

using namespace std;

int n;
int a[200010];
int 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++)
	{
		printf("%d ", a[i] ^ sum);
	}
	cout << endl;
	return 0;
}