Code for the final examination.