Completed solution for P35