Devesh Agarwal's submission of Pair It | CodeChef