Al-A'raf 7:95
ثُمَّ بَدَّلْنَا مَكَانَ ٱلسَّيِّئَةِ ٱلْحَسَنَةَ حَتَّىٰ عَفَوا۟ وَّقَالُوا۟ قَدْ مَسَّ ءَابَآءَنَا ٱلضَّرَّآءُ وَٱلسَّرَّآءُ فَأَخَذْنَـٰهُم بَغْتَةً وَهُمْ لَا يَشْعُرُونَ
Thumma baddalna makana assayyi-atialhasanata hatta AAafaw waqaloo qadmassa abaana addarraowassarrao faakhathnahum baghtatanwahum la yashAAuroon
Then We exchanged in place of the bad [condition], good, until they increased [and prospered] and said, "Our fathers [also] were touched with hardship and ease." So We seized them suddenly while they did not perceive.
Thereafter, We substituted good in place of evil until they increased, and said, “Hardship and prosperity came to our fathers (too).” Then We seized them suddenly while they were not aware.