Modern offices work by passing messages from one employee to the next.
As the director of a large company, you are interested in finding a method by which you can determine the best person to give messages to such that everyone in the company gets the message as soon as possible. You know that your employees only speak with the people in their direct contact in the office, and you also know that for each each employee it will take a certain amount of time to pass the message onto each of their contacts. You need to write a program to determine the person who, when given the message, results in everyone receiving the message within the shortest possible time. In this instance, you are only interested in the time taken for the last person to get the message. Your program will input data for different sets of employees.