Рябенко - Лабораторная работа №2

@VVillwin, @borodulina, @ljaljushkin review please.
Too complex, could you split/rewrite in simple way?