Feedback for MAGICHF problem

Problem Link: MAGICHF Problem - CodeChef

Feedback

in this question it is not mentioned that the magician will swap only the boxes which contain gold coin it can swap also those boxes which doesn’t have the gold coin like eg: gold coin is in box number 2 at first, he swaps 1 and 2 and then he can swap 4 and 5 also. what will be the code then.