The Goldman Sachs Group, Inc. Medium-Term Notes, Series N Second Amended and Restated Distribution Agreement