Amazon Interview Question

How to design a cross-road traffic light system?