#include <iostream>

using namespace std;
int a[200010];
int main(){
    int i,n,x = 0; cin >> n;
    for(i=0;i<n;i++){
        cin >> a[i];
        x ^= a[i];
    }
    for(i=0;i<n;i++){
        cout << (x^a[i]) << " ";
    }
    cout << endl;
}