The history of education extends at least as far back as the first written records recovered from ancient civilizations. Historical studies have included virtually every nation. Perhaps the earliest formal school was developed in Egypt's Middle Kingdom under the direction of Kheti, treasurer to Mentuhotep II (2061-2010 BC). In Mesopotamia, the early logographic system of cuneiform script took many years to master. Thus only a limited number of individuals were hired as scribes to be trained in its reading and writing. Only royal offspring and sons of the rich and professionals such as scribes, physicians, and temple administrators, were schooled. Most boys were taught their father's trade or were apprenticed to learn a trade. Girls stayed at home with their mothers to learn housekeeping and cooking, and to look after the younger children. Later, when a syllabic script became more widespread, more of the Mesopotamian population became literate. Later still in Babylonian times there were libraries in most towns and temples; an old Sumerian proverb averred "he who would excel in the school of the scribes must rise with the dawn." There arose a whole social class of scribes, mostly employed in agriculture, but some as personal secretaries or lawyers. Women as well as men learned to read and write, and for the Semitic Babylonians, this involved knowledge of the extinct Sumerian language, and a complicated and extensive syllabary. Vocabularies, grammars, and interlinear translations were compiled for the use of students, as well as commentaries on the older texts and explanations of obscure words and phrases. Massive archives of texts were recovered from the archaeological contexts of Old Babylonian scribal schools known as (2000–1600 BCE), through which literacy was disseminated. The Epic of Gilgamesh, an epic poem from Ancient Mesopotamia is among the earliest known works of literary fiction. The earliest Sumerian versions of the epic date from as early as the Third Dynasty of Ur (2150–2000 BC) (Dalley 1989: 41–42).