#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i st; vector cnt(30,0); int Q; cin >> Q; rep(q, 0, Q){ int type; cin >> type; if(type == 1){ int x; cin >> x; if(st.find(x) != st.end()) continue; st.insert(x); rep(i, 0, 30){ if(x & (1<> x; auto itr = st.find(x); if(itr == st.end()) continue; st.erase(itr); rep(i, 0, 30){ if(x & (1<