Nikolay Domashenko's submission of K-MEX | CodeChef