Soloviev - Lab5: final version.