// naive #include #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using namespace std; template ostream& operator<<(ostream& o,const pair &p){return o<<"("< ostream& operator<<(ostream& o,const vector &vc){o<<"sz = "<>7); seed = seed ^ (seed<<17); return (seed>>33); } int main(){ int N,Q; cin>>N>>Q>>seed; rep(i,10000) next(); vector a(N); rep(i,N) a[i] = next(); sort(all(a)); ll res = 0; rep(qt,Q){ int x = next(); int cnt = lower_bound(all(a),x) - a.begin(); res ^= ll(cnt)*qt; } cout<