apple pie's submission of K-MEX | CodeChef