Solved 6-th problem