Utkarsh Singh's submission of Mahasena | CodeChef