Add solution for tasks 4.
Fixed errors in 4.4 task.

Signed-off-by: Serg Brych <sbrych@gmail.com>