Language: C++


// author-Shivam gupta

#include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795

#define MOD 1000000007

#define read(type) readInt<type>()
#define max1 1000001
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
#define int long long
bool isPowerOfTwo (int x)
{
  /* First x in the below expression is
    for the case when x is 0 */
  return x && (!(x&(x-1)));
}
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}

int a1[max1];
signed main()

{

int n;
cin>>n;
int a[n];
int ans=0;
FOR(i,n){
cin>>a[i];
ans=ans^a[i];
}
FOR(i,n){
out1(ans^a[i]);}
}



/*

           .$                                  $.
          /:;                                  :;\
         : $                                    $ ;
         ;:$                                    $;:
        : $:              ________              ;$ ;
        ; $;;     _..gg$$SSP^^^^T$S$$pp.._     ::$ :
       : :$;|  .g$$$$$$SSP"      "TS$$$$$$$p.  |:$; ;
       ; :$;:.d$$$$$$$SSS          SS$$$$$$$$b.;:$; :
      :  :$$$$$$$$$$$$SSS          SS$$$$$$$$$$$$$;  ;
      ;  $$$$$$$$$$$$$$SSb.      .dS$$$$$$$$$$$$$$;  :
     :  :S$$$$$$$$$$$$$$SSSSppggSSS$$$$$$$$$$$$$$$;   ;
     |  :SS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$;   :
     |  :SS$$$$$$$$$$$$$$$$$^^^^^^^^^$$$$$$$$$$$$$$   :
     ;   SS$$$$$$$$$$P^"                 "^T$$$$$$$   :
    :    :SS$$$$$$$$$                       T$$$$$;   :
    |     SSS$$$$$$$;                        T$$$$    :
    |     :SSS$$$$$$;                        :$$$;    :
    ;      SSS$$$$$$;                        :S$$;    :
    ;      :SS$$P"^P                          S$$;    :
    ;    ..d$$$P    `                         S$$$    :
    ;     T$$$P                          dS   T$$$b.  :
    ;    :$$$$.     .                   dSS;   $$$$$b.:
    ;    :$$$$$b     Tb.   .          .dSS$$b.d$$$$$$$:
    :    $$$$$$$b     TSb   Tb..g._, :$$SS$$$$$$SSS$$$:
    :   :$$$$$$$$b     SSb   T$SS$P   "^TS$$$$$$P"TS$$:
    :   $$$$$$$$$$b._.dS$$b _ T$$P _     TSS$SSP  :SS$:
    :  :$$$$SSS$$$$$$$$$P" d$b. _.d$P     TSSP"    SS$:
    :  :P"TSSP"^T$$$$$$P  :$$$$$$$$P d$$b          $S$;
    :  :b.dS^^-.  ""^^"    $b T d$$$s$$$$b __..--""$ $;
    :  :$$$S    ""^^..ggSS$$$$$$$$$$$$$$P^^""     .$ $;
    :   $$$$$pp..__   `j$$$$$$^$$$$$b. d....ggppTSSS$$;
    :   $$$$SP     """t  :$$$$ $$$$$$$b.  d$b    `TSS$;
    :  \:$$SP   _.gd$$P_d$$$$$ $$$$$$$$$bd$P'    .dSPd;
    :   \"^S     "^T$$$$$$$$$$ $$$$$SS$$$$b.    dSS'd$;
    $    $. "-.__.gd$$$$$$$SP:S$$P  TSS$$$$$bssS^".d$$:
   :$    $$b.   ""^^T$$$$SP' :S$P    TSSSP^^""  .d$$$$:
   :$   :$$$P        "^SP'   :S;     .^"`.     $$$$$$$:
   $;   :$$$            "-.  :S;  .-"     \    :$$$$$$:
  .$ :  $$$;   :           `.:S;.'         ;    $$$$$$:;
 .P :S  $$$    ;             `^'                :$$$$$:;
.P  S;.d$$;   :               -'                 $$$$$:;
$  :SS$$$$    ;     __....----  --...____        :$$$ :S
$  $SSS$$;    :  ; d$$$$$$$pppqqqq$$$$$$L;       :$$$ SS
: :SSSSS$$     ; : \ "^T$$$$$$$$$$$$$P' .':      $PT$ SS;
 $SP^"^TSP\    :  \ "-.  """"""""""" .-"  ;     /   $ SSSb.
 :S     S  \           "--...___..--"    /  :  /    :gSSSSSb.
  T bug T   \       `.      _____       /   ; /
   `         \ :      "==="""""""""===""   : /
              `:                           ;'
                "-.                     .-"
                   ""--..         ..--""
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   33 | #define out1(x) cout<<x<<" "
      |                        ^~~~~
      |                          |
      |                          const char [2]
a.cc:62:1: note: in expansion of macro 'out1'
   62 | out1(ans^a[i]);}
      | ^~~~