tanvir's submission of Mahasena | CodeChef