it turn exactly 100th problem appear programming competition so special and special problem LISYou give permutation p_1 p_2 ldot p_2n1 integer 1 2n1 you process q update ith update consist swap p_u_i p_v_iafter update find cyclic shift p LIS le n determine shift Refer output section detailshere LISa denote length long strictly increase subsequence ahack disabled problem do not ask