Final competition code.