left foot

Leaving the Musjid with the left foot

Q: Is there any hadith with reference which states it is sunnah to enter the Masjid with the right foot and leave the Masjid with the left foot? If there isn't any hadith which states one should leave the Masjid with the left foot, is it permissible and better to leave the Masjid with the right ​foot if one intends to do something good when leaving the Masjid?