Softsuave interview question

To Traffic signal problem in java or pyhton