The clan from which all the emperors of Japan are descended. Claiming the Sun-goddess as ancestress, they had their chief shrine at Ise. Gradually they established control over rival clans and by the 5th century ad much of Japan was subject to them. They were influenced by Chinese culture, initially learning of China through southern Korea. Buddhism and the study of Chinese language and literature were introduced in the 7th century and Prince Shotuku produced administrative systems based on Sui China. The Yamato chief assumed the title emperor and built capitals based on Tang Chinese designs first at Nara then at Kyoto. By the 9th century the Fujiwara family controlled the imperial court and during the period of the shoguns the imperial family had little power.