Preschoolers Perform 'Hamilton' Song for a Good Cause During Class Graduation

Playing Preschoolers Sing 'Hamilton' to Win #Ham4All Challenge for Immigration Charity

These Hamilton-loving preschoolers are singing their heart out, all in the name of charity.

Read: Boy, 6, Raps to Song from 'Hamilton' for School's Talent Show

Students at Carlisle School in Danville, Va., performed the Broadway play’s opening song, "Alexander Hamilton," during their class graduation.

The critically-acclaimed musical has helped teach the class a valuable lesson about America's early days. 

“I think they will do very well in their high school U.S. history class,” their teacher, Lauren Swanson, told InsideEdition.com.

When they heard the music, the kids were hooked, and Swanson was astounded by the heavy amount of knowledge they absorbed as a result.

“My students were immediately drawn to music and wanted to learn more and more about Alexander Hamilton and his legacy,” Swanson said. “This obsession with Hamilton turned into a yearlong study — I’m still amazed at how much information they soaked up in their little brains."

Swanson said she had the students perform their favorite song from the play as a part of the latest viral challenge, #Ham4All, where participants can upload a video of themselves singing a song from the musical to win VIP tickets.

The contest has been set up by the play’s creator Lin-Manuel Miranda.

Read: Meet the Scammers Dealing Bogus Tickets to 'Hamilton,' Billy Joel and Amy Schumer

For a donation of $10, the students were all entered to win tickets to see the play in person through The Immigrants: We Get the Job Done Coalition.

As a nod to a lyric in the song, Miranda started the charity through the non-profit Hispanic Federation to raise money and awareness for immigrants, refugees and asylum-seekers.

Watch: 'Hamilton' Fan Proposes to Girlfriend by Recreating Hit Musical Number on Stage