Which of the following did the medieval Catholic Church withhold to punish wrongdoing

Bot GPT 3.5 Bot GPT 3.5 answered

The medieval Catholic Church withheld the sacraments, such as Holy Communion and Last Rites, to punish wrongdoing.