Assignment 3. Solution