Madhav_J's submissions for second problem