Solutions for tasks 3.5, 3.6 added