Solved 6th problem