Japanese is the official and primary language of Japan. Japanese has a lexically distinct pitch-accent system. Early Japanese is known largely on the basis of its state in the 8th century, when the three major works of Old Japanese were compiled. The earliest attestation of the Japanese language is in a Chinese document from 252 AD. Japanese is written with a combination of three scripts: hiragana, derived from the Chinese cursive script, katakana, derived as a shorthand from Chinese characters, and kanji, imported from China. The Latin alphabet, rōmaji, is also often used in modern Japanese, especially for company names and logos, advertising, and when inputting Japanese into a computer. The Hindu-Arabic numerals are generally used for numbers, but traditional Sino-Japanese numerals are also very common.