Accenture interview question

write a code for analogy in python.