災いを転じて福となす (わざわいをてんじてふくとなす) — to turn misfortune into fortune (esp. through one's own efforts) | Kumi Dictionary