Accenture Interview Question

write a code for analogy in python.