you play permutation p length n lose Blair AlabamaLuckily remember information permutation more specifically remember array b length n b_i number indice j j p_j p_iYou array b want find permutation p however memory is not perfect constantly change value b learn for q second follow thing happen 1 x realize b_i equal x 2 need find value p_i if there s answer print it prove there s possible answer constraint problem Answer query remember array