Apple interview question

Code an arbiter in verilog.