Confucianism arrived from China between the 6th and 9th centuries, but the derived line of thought that brought about deep social changes in Japan was Neo-Confucianism, which became the official doctrine of the Tokugawa shogunate (1603–1867). The precepts of loyalty and filial piety as tribute ( "") dominated the Japanese at the time, as respect for elders and ancestor worship that Chinese Confucianism taught were well accepted by the Japanese, and these influences have spread throughout daily life. Like other Chinese influences, the Japanese adopted these ideas selectively and in their own manner, so that the "loyalty" in Confucianism was taken as loyalty to a feudal lord or the Emperor.