In the Song Dynasty (sòng cháo 宋朝) there was a joker called Sun Shan (sun shan 孙山). One year he went to take the imperial examination, and came bottom of the list of successful candidates.
Back in his hometown, one of his neighbor asked him whether the neighbor's son had also passed. Sun Shan said, with a smile:"Sun Shan was the last on the list. Your son came after Sun Shan." The people used this idiom to indicate failing in an examination or competition.