In the prehistoric era, hunting animals and collecting plants prevailed. A shift to farming advanced during the 10th to 12th centuries. Many communities were formed, and integrated into the three small countries of Hokuzan, Chūzan, and Nanzan. In 1372, Chūzan began paying tribute to the Chinese Ming Dynasty. This small country became strong by trade with the Ming dynasty, and attacked the other countries. It became the "Ryūkyū Kingdom". This kingdom flourished through trade throughout Asia during the 15th and 16th centuries.