little Maxim love interesting problem he decide share problem Initially array consist n zero the element array index start 1 then follow query change array each query characterize integer viti in answer query vith array element equal ti aviti1vinMaxim think pair integer xy good Maxim think array consist n integer lucky integer 1in1 pair integer aiai1 good Note order number pair important specifically 1221after query change array Maxim wants know way replace zeroes array integer result array zero lucky of course distinct zero replace distinct integersmaxim tell sequence query pair integer consider lucky help Maxim solve problem