Input (grade 12): He visited Hampton Court Palace with future American president John Quincy Adams, at the time a diplomat in London, where they saw the Raphael Cartoons.
Output (grade 7): He visited Hampton Court Palace with John Quincy Adams, who was a diplomat in London.