Global Relay interview question

How to build table for a certain situation