#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> Q; set s; REP(j,Q){ int q,x; cin >> q; if(q==1){ cin >> x; if(s.count(x)==1) continue; REP(i,31) if(x & (1<> x; if(s.count(x)==0) continue; REP(i,31) if(x & (1<