Princeton web excersises solution