Build a grid of lights in React where clicking on a light activates it, and lights deactivate in the reverse order they were activated.
Requirements:
- Display a grid of lights (e.g., 4x4).
- Clicking a light toggles it ON (yellow).
- Maintain activation order:
- When all lights are ON and you click another one, the first activated light should turn OFF.
- In general, lights should deactivate in the reverse order they were activated (like a stack).
- Focus on functionality, not styling.