Add solution to 7th problem