Solution of Task 6.1.1