Task 2.3.23 solution