The story is Cai Repays a Kindness, from The Lute, a fourteenth-century play by Gao Ming; one edition offers a different tale as an alternative. Cai Bojie left his new wife Zhao Wuniang to sit the imperial examinations and placed first, but stayed in the capital and was made to marry the prime minister's daughter. At home famine struck, and Wuniang kept his parents alive with help from the neighbor Zhang Guangcai. After years of hardship she traveled to the capital and found him. The couple, with his second wife, went home to tend the family graves, and Cai rewarded Zhang for his help. It fits an upper stick whose last line says a junior scholar goes out and returns as top graduate, with gratitude settled at the end.