Task 1 solution
Task 2