Shivam Mittal's submission of Mahasena | CodeChef