Question: who was the last ruler of the tang dynasty?
Answer: Emperor Ai of Tang