petya array integer a_1 a_2 ldot a_n he like sorted array unfortunately give array arbitrary Petya want sort itPetya like challenge want sort array 3cycles more formally operation pick 3 pairwise distinct index j k 1 leq j k leq n apply j k cycle array it simultaneously place a_i position j a_j position k a_k position change elementfor example 10 50 20 30 40 60 choose 2 j 1 k 5 array underline50 underline40 20 30 underline10 60petya apply arbitrary number 3cycles possibly zero you determine Petya sort array ie nondecrease