Ex. 4
solution