Solving problem 12. Test 2.