Ex. 2
solution