Arnav Banerjee's submission of Mahasena | CodeChef