Pergunta de entrevista da empresa Amazon

Write a program that would identify first common manager of two employees