Solution to a weekly brain teaser my company posted