Solving Assignment 2