What was the last party John Quincy Adams belonged to?

John Q. Adams died as a Whig, the party he helped to start up.