#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x> 19) ^ (t ^ (t >> 8)); } ll mo=100003; ll N,Q,A[100030]; ll has[100030]; ll modpow(ll a, ll n) { ll r=1; while(n) r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1; return r; } void solve() { int i,j,k,l,r,x,y; string s; cin>>N>>Q; FOR(i,N) { A[i]=xor128()%mo; has[A[i]]++; } while(Q--) { cin>>x; if(x==0) { cout<<0<=0;y--) if(has[y*rev%mo]) break; } cout<