Sayyidah Fatimah al-Kubra (may Allah be pleased with her) said that when the Messenger of Allah (peace and blessings be upon him) entered the mosque, he would say: "O Allah, forgive me my sins and open for me the doors of Your mercy." And when he went out, he would say the same, except that he would say: "the doors of Your bounty."
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 19246