#include using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define ll long long const long long mod=998244353; const long long hmod=46216567629137; int main(){ cin.tie(0)->sync_with_stdio(0); cout.tie(0); ll maximum=(1<<30); int N; cin>>N; ll A[200009]; for(int i=1;i<=N;i++) cin>>A[i]; ll AA[200009]; for(int i=1;i<=N;i++) AA[i]=maximum-A[i]; int bit_dat[40]; for(int i=0;i<=32;i++) bit_dat[i]=0; for(int i=1;i<=N;i++){ ll wari=1; for(int j=0;j<=31;j++){ if((AA[i]/wari)%2==1) bit_dat[j]++; wari*=2; } } ll wari=(1<<29); for(int i=29;i>=0;i--){ cout<<1<<" "<