Added solution for P17.