Added classic solution.