Harsh Bhardwaj's submission of Mahasena | CodeChef