Sanyam Singhal's submission of Mahasena | CodeChef