May 8 is Teacher Appreciation Day, and The Tonight Show Starring Jimmy Fallon knew just how to celebrate.

The show had a few teachers in the audience Tuesday night and decided to honor them by asking them a little bit about themselves and then creating a song about them in the latest installment of Freestylin’ with The Roots, a popular segment on the late night talk show. Black Thought showcased his incredible freestyle skills by writing lyrics on-the-spot in the style of Jackson 5, Migos, and ABBA.

The first song, dedicated to a STEM teacher from Bay Ridge, Brooklyn, was in the style of “ABC” by the Jackson 5. The result was truly incredible, considering Black Thought employed just the few details that Fallon was able to get from a quick interview. “He got NYC/Origami from the deli/He got origami, NYC, up in the deli,” were some of his lyrics.  

Another teacher, Ms. Kramer, who teaches English as a second language in Brooklyn, got a tune in the style of Migos “Stir Fry.” “At the Passenger’s Academy, gang, gang/Ms. Kramer teaches English as a second lang/Most compassionate teacher with the third eye,” Black Thought rapped. The highlight here is Questlove’s inspired ad-libs, hilariously shouting “French fry!” at the 5:25 mark. 

A third teacher, who teaches seventh grade science at Lower Manhattan Community Middle School in New York City, got an ABBA-inspired song in the style of “Dancing Queen.”

Fallon’s teacher appreciation stunt comes as thousands of teachers across the country, including in West Virginia, Oklahoma, Kentucky, and Arizona, have been protesting for better pay and better education funding.