NEW YORK - Ariana Grande has released a song referencing her exes -- including former fiance and "SNL" star Pete Davidson and the late Mac Miller.

The midtempo song "Thank U, Next" references past splits and expresses gratitude for what she has learned from the relationships. She talks about a Sean -- she dated rapper Big Sean -- and a Pete and Malcolm, which is the real first name of Miller. She says she wishes she could thank Malcolm and calls him an angel. The rapper died of a drug overdose in September.

In the song, she sings about her new love -- "Ari" -- and says "She taught me love, she taught me patience."

Meanwhile an emotional Davidson referenced the split on "SNL," calling her a "wonderful, strong person."