lokesh garg's submission of Mahasena | CodeChef