Problem 3

In progress of solving