Add punctuation: Despite being out of favour on all sides Khayyam remained at the Court and tried to regain favour
Despite being out of favour on all sides, Khayyam remained at the Court and tried to regain favour.