Step 1: Understand the clue.
We need the gas that smells like rotten eggs.
Step 2: Identify it.
Hydrogen sulfide ($H_2S$) is a colourless, toxic gas with the typical rotten-egg smell.
Step 3: Where it forms.
It comes from the decay of sulfur-containing matter, so it is found in sewage, swamps and volcanic gases.
Step 4: Rule out others.
Sulfur dioxide smells like a burning match. Ammonia has a sharp cleaning-product smell. Carbon monoxide is odourless.
Step 5: Conclude.
The rotten-egg gas is hydrogen sulfide.
Answer: Hydrogen Sulfide