today lesson Vitya learn interesting function mex mex sequence number minimum nonnegative number present sequence element for example mex43301152 mex1230Vitya quickly understand task teacher sameyou give array consist n nonnegative integer m query each query characterize number x consist follow consecutive step perform bitwise addition operation modulo 2 xor array element number x find mex result array note query array change