Adding solution to homework1.