By what was XXX replaced?
Narmer
The identity of Narmer is the subject of ongoing debate, although mainstream Egyptological consensus identifies Narmer with the First Dynasty pharaoh Menes, who is also credited with the unification of Egypt, as the first pharaoh.