Solve lab5.