//以下、tsuba3から借りてきたコード
#pragma GCC optimize("O3")

#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

template <typename IStream = decltype(cin), typename OStream = decltype(cout)>
struct FastIO {
    char *buf, *OUT, *out;
    OStream& os;

    FastIO(size_t input_size = 1e7, size_t output_size = 1e7): os(cout) {
        buf = new char[input_size];
        OUT = new char[output_size];
        out = OUT;
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        cin.read(buf, input_size);
    }

    FastIO(IStream& in, OStream& out, size_t input_size = 1e7, size_t output_size = 1e7): os(out) {
        buf = new char[input_size];
        OUT = new char[output_size];
        this-> out = OUT;
        in.read(buf, input_size);
    }

    ~FastIO() {
        os.write(OUT, out - OUT);
    }

    char readc() {
        return *buf++;
    }

    template<typename T>
    void readui(T &n) {
        n = 0;
        char c = readc();
        for (; '0' <= c && c <= '9'; c = readc())
            n = 10 * n + c - '0';
    }

    template<typename T>
    void readi(T &n) {
        bool negative = false;
        if (*buf == '-') negative = true, buf++;
        readui(n);
        if (negative) n = -n;
    }

    template<typename T>
    void readuf(T &x) {
        x = 0;
        T y = 0;
        int z = 0;
        char c = readc();
        for (; '0' <= c && c <= '9'; c = readc())
            x = 10 * x + c - '0';
        if (buf[-1] == '.')
            for (; '0' <= c && c <= '9'; c = readc(), ++z)
                y = 10 * y + c - '0';
        x += y / pow(10, z);
    }

    template<typename T>
    void readf(T &x) {
        bool negative = false;
        if (*buf == '-') negative = true, buf++;
        readuf(x);
        if (negative) x = -x;
    }

    void reads(string &s) {
        const char *begin = buf;
        char c;
        while (c = readc(), c != ' ' && c != '\n') {}
        s = string(begin, buf);
    }

    void readline(string &s) {
        const char *begin = buf;
        while (readc() != '\n') {}
        s = string(begin, buf);
    }

    void writec(char c) {
        *out++ = c;
    }

    void writes(string& s) {
        memcpy(out, s.c_str(), s.size());
        out += s.size();
    }

    constexpr static char digit_pairs[] = {
            "00010203040506070809"
            "10111213141516171819"
            "20212223242526272829"
            "30313233343536373839"
            "40414243444546474849"
            "50515253545556575859"
            "60616263646566676869"
            "70717273747576777879"
            "80818283848586878889"
            "90919293949596979899"
    };

    template<typename T>
    void writeui(T n) {
        if (n == 0) {writec('0'); return;}
        int size;
        if (n >= 1e9) {
            size = 10;
        } else if (n >= 1e5) {
            if (n >= 1e7) {
                if (n >= 1e8) size = 9; else size = 8;
            } else {
                if (n >= 1e6) size = 7; else size = 6;
            }
        } else {
            if (n >= 1e3) {
                if (n >= 1e4) size = 5; else size = 4;
            } else if (n >= 1e1) {
                if (n >= 1e2) size = 3; else size = 2;
            } else {
                size = 1;
            }
        }
        char *c = out + size;
        out += size;
        while (n >= 100) {
            int x = n % 100;
            n /= 100;
            *--c = digit_pairs[2 * x + 1];
            *--c = digit_pairs[2 * x];
        }
        while (n > 0) {
            *--c = '0' + (n % 10);
            n /= 10;
        }
    }

    template<typename T>
    void writei(T n) {
        if (n < 0) {
            writec('-');
            writeui(-n);
        } else {
            writeui(n);
        }
    }
};

int main() {
    FastIO io;

    unsigned int n, a[200000], b = 0;
    io.readui(n);
    rep(i, n)io.readui(a[i]);
  	rep(i, n)b ^= a[i];
    rep(i, n) {io.writeui(b ^ a[i]);io.writec(' ');}

    return 0;
}



Measured memory_bytes: 8696