black gift Divine array consist n 1 le n le 2000 integer each position initial value after shout curse array angry start unstoppable transformationthe transformation consist infinite step Array change ith step follow way position j a_j equal number occurrence a_j start stephere example help understand process well initial array2 1 1 4 3 1 2after 1st step2 3 3 1 1 3 2after 2nd step2 3 3 2 2 3 2after 3rd step4 3 3 4 4 3 4 in initial array 2s 1s 4 3 step element equal number occurrence initial array two change 2 one change 3 change 1 change 1the transformation step continue foreveryou process q query query Black curious know value a_x kth step transformation