(* your code goes here *)
let permute i j lst =
let ar
= Array.of_list
(lst
); let tmp = ar.(i);
ar.(i) <- ar.(j);
ar.(j) <- tmp;
KCogeW91ciBjb2RlIGdvZXMgaGVyZSAqKQoKbGV0IHBlcm11dGUgaSBqIGxzdCA9IAogICBsZXQgYXIgPSBBcnJheS5vZl9saXN0IChsc3QpOwogICBsZXQgdG1wID0gYXIuKGkpOwogICBhci4oaSkgPC0gYXIuKGopOwogICBhci4oaikgPC0gdG1wOwogICBBcnJheS50b19saXN0KGFyKQo=