9th problem solution