A referendum, an Article 50 extension, a general election.
Extension before referendum. So then where does the general election come in?
Extension - referendum - election
Extension - election - referendum
Election - extension - referendum
Article 50 extension - for the purpose of a referendum - and a general election only after Brexit is annulled.
Extension - referendum - general election