Duolingo Interview Question

abstract natural language problem (medium)