The origins of the current Indian culture can be traced back to the Indus Valley civilisation, which was contemporaneous with the ancient Egyptian and Sumerian civilisations, around 2700 BCE. During this period, the first evidence of attitudes towards sex comes from the ancient texts of Hinduism, Buddhism. These ancient texts, the Rig Veda among few others, reveal moral perspectives on sexuality, marriage and fertility prayers. The epics of ancient India, the Ramayana and Mahabharata, which may have been first composed as early as 500 BCE, had a huge effect on the culture of Asia, influencing later Chinese, Japanese, Tibetan culture and South East Asian culture. These texts support the view that in ancient India, sex was considered a mutual duty between a married couple, where husband and wife pleasured each other equally, but where sex was considered a private affair, at least by followers of the aforementioned Indian religions. It seems that polygamy was allowed during ancient times. In practice, this seems to have only been practiced by rulers, with common people maintaining a monogamous marriage. It is common in many cultures for a ruling class to practice both polyandry and polygyny as a way of preserving dynastic succession.