Implement mimic problem using dictionary manipulation