Add solution for 7th problem