Ninad Sutrave's submission of Mahasena | CodeChef