Early works of Japanese literature were heavily influenced by cultural contact with China and Chinese literature, often written in Classical Chinese. Indian literature also had an influence through the diffusion of Buddhism in Japan. Eventually, Japanese literature developed into a separate style in its own right as Japanese writers began writing their own works about Japan, although the influence of Chinese literature and Classical Chinese remained until the end of the Edo period. Since Japan reopened its ports to Western trading and diplomacy in the 19th century, Western and Eastern literature have strongly affected each other and continue to do so.