Ashwanth K's submission of Mahasena | CodeChef