Wang Teng, a displaced commoner caught in the chaos at the end of the Sui and the beginning of the Tang, uses his knowledge of the Five Surnames and Seven Great Clans to pass himself off as a member of the Taiyuan Wang clan. Through a series of calculated moves, he successfully integrates into the clan and wins Li Yuan's recognition.