Friedrich Nietzsche said this quote

if we possess a why of life we can put up with almost any how.