The nation that had the most cultural influence on Japan was China. This is evident from the Chinese influences on Japanese architecture, religion, and cuisine. Additionally, the Chinese writing system was adapted by the Japanese, and Chinese literary traditions were highly respected. While other nations also had an influence on Japan, such as Korea and the Ryukyu Islands, China was the most influential.
_____________________________________________
Let me know if there are any questions regarding my answer.