Solutions of the tasks.