saying

Sweet are the uses of adversity.

Theme: experience Keyword: adversity

means

Difficult circumstances may yield valuable lessons or unexpected benefits.

Example

The failed project taught them skills that made their next venture successful.