(1) On four [occasions] a person must thank God [for God's goodness]; 1] after crossing the ocean and reaching his destination; 2] after crossing the desert or any other dangerous road and reaching his destination; included in this rule is also one who was saved from any other peril, as when a wall caved in on him or an ox lunged at him, ready to gore him, or robbers attacked him on the road, or thieves at night and he was saved from them, or from similar perils; 3] one who suffered from serious illness or a serious injury or he was confined to bed for [at least] three days due to an illness and he recovered, his health restored; 4] one who was in prison even if [he was in prison] only because of monetary matters and he was released. [The following phrase may serve as] a mnemonic device: "All those who are alive thank you, selah." [The word chayim—חיים — forms the acronym of] choleh—a sick person, yisurim —a person suffering [in prison], yam—(crossing the) ocean, midbar—(crossing the) desert. What berachah should they say? Baruch ata Adonoy Elokeinu melech ha'olam hagomeil lechayavim tovot shegemalani kol tov, [Blessed are You, Hashem, our God, Ruler of the universe, Who bestows good things upon the guilty, Who has bestowed every goodness upon me]. The listeners should respond: mi shegemalecha tov hu yigmalecha kol tov selah, [May The One Who has bestowed goodness upon you continue to bestow every goodness upon you forever].