Ilya Klimko's submission of Restore the Permutation | CodeChef