function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    var N = parseInt(input[0], 10);
    var vec_A = input[1].map(e =>(parseInt(e, 10)));
    var W = xorAry(vec_A);
    var vec_ans = [];
    for (var i = 0; i < N; i++){
        vec_ans.push(String(W ^ vec_A[i]));
    }
	console.log(vec_ans.join(' '));
}   

var xorAry  = function(arr) {
    var res = 0;
    arr.forEach(function(elm) {
         res = res ^ elm;
    });
    return res;
};

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
