#include <bits/stdc++.h>
using namespace std;
long long a[200005], n, xsum;
int main() {
    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> a[i];
        xsum^=a[i];
    }
    
    for (int i=0; i<n; i++) cout << (xsum^(a[i])) << " ";
}
