Infosys interview question

Write the code for traffic lightss synchronisation