Sophocles was one of three ancient Greek tragedians whose plays have survived. His first plays were written later than or contemporary with those of Aeschylus, and earlier than or contemporary with those of Euripides. Sophocles wrote over 120 plays during the course of his life, but only seven have survived in a complete form: Ajax, Antigone, Women of Trachis, Oedipus Rex, Electra, Philoctetes and Oedipus at Colonus. For almost 50 years, Sophocles was the most celebrated playwright in the dramatic competitions of the city-state of Athens that took place during the religious festivals of the Lenaea and the Dionysia. He competed in 30 competitions, won 24, and was never judged lower than second place. Aeschylus won 13 competitions, and was sometimes defeated by Sophocles, while Euripides won four competitions.