I once knew a Cardassian, a dashing, handsome young man with a promising career. But one day, through no fault of his own, he found himself exiled and alone, with nowhere to turn. But did he give up? No. He struck upon a brilliant plan. Instead of fleeing for the rest of his life, he sought shelter in the one place no one expected him to go: in a stronghold of his people's most hated enemies. There, surrounded by hostile strangers, he built a life, and there, against all odds, against the merciless logic of the universe itself... he thrived.
- Link Only:
[Link only answers](https://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers/8259#8259) are considered very low quality and [can get deleted](https://stackoverflow.com/help/deleted-answers), please put the important parts from the linked resource into the answer body.
- Code Only:
Thank you for this code snippet, which might provide some limited, immediate help. A [proper explanation](https://meta.stackexchange.com/q/114762/349538) would greatly improve its long-term value by showing why this is a good solution to the problem and would make it more useful to future readers with other, similar questions. Please  your answer to add some explanation, including the assumptions you’ve made.