Mohan's submission of Mahasena | CodeChef