From prehistoric times, through kagura, the Japanese paid homage to the native deities and offered comfort to the souls of the dead as part of the Shint ritual. Traditionally, kagura was divided into mikagura, the performance held at the imperial palace, and satokagura, held at the various Shint shrines. Satokagura has undergone significant changes during its growth and development, but mikagura has remained almost unchanged since its official formulation in the eleventh century. Mikagura is performed by the members of the Imperial court dance group. Its program consists of an introductory song, dances accompanied by song and music, a shamanistic ritual, a pantomimic performance, and more songs. Although the basic form of kagura is mime with song and music, even in earlier times it was affected by other performing arts. The more sophisticated masked plays in its repertory were likely borrowed from gigakutogether with the lion dance. Tanemaki (seed planting dance) in kagura can be traced to dengaku, a native festivity related to rice growing. In the thirteenth century, kagura included dramatic pieces anticipating the N theater, which developed later.