Input (grade 10): He becomes the ruler of Thebes after solving the riddle of the sphinx and in the process, marries the widowed Queen, his mother Jocasta.
Output (grade 10): Oedipus becomes the ruler of Thebes after solving the riddle of the sphinx and in the process, marries the widowed Queen, his mother Jocasta.