The correct sequence of formation of fossil fuels is: Death of huge ferns and leaves covering the swamps -> Sinking of these dead plants to the bottom of the swamps -> Formation of a spongy layer called pete -> Formation of layers of sedimentary rocks over it -> High pressure of the sedimentary rocks turning pete into fossil fuels.