וּבְב֨וֹא עַם־הָאָ֜רֶץ לִפְנֵ֣י יְהוָה֮ בַּמּֽוֹעֲדִים֒ הַבָּ֡א דֶּרֶךְ־שַׁ֨עַר צָפ֜וֹן לְהִֽשְׁתַּחֲוֺ֗ת יֵצֵא֙ דֶּרֶךְ־שַׁ֣עַר נֶ֔גֶב וְהַבָּא֙ דֶּרֶךְ־שַׁ֣עַר נֶ֔גֶב יֵצֵ֖א דֶּרֶךְ־שַׁ֣עַר צָפ֑וֹנָה לֹ֣א יָשׁ֗וּב דֶּ֤רֶךְ הַשַּׁ֙עַר֙ אֲשֶׁר־בָּ֣א ב֔וֹ כִּ֥י נִכְח֖וֹ יצאו [יֵצֵֽא׃]
אָבער אַז דאָס פֿאָלק פֿון לאַנד קומט פֿאַר גאָט אין די יום-טובֿים, זאָל דער װאָס גײט אַרײַן דורכן צפֿון-טױער זיך צו בוקן, אַרױסגײן דורכן דָרום-טױער, און דער װאָס גײט אַרײַן דורכן דָרום-טױער, זאָל אַרױסגײן דורכן צפֿון-טױער; ער זאָל זיך ניט אומקערן דורך דעם טױער װאָס ער איז דורך אים אַרײַנגעגאַנגען, נאָר אַנטקעגן זיך זאָל ער אַרױסגײן.
Megillah
Nahman b. Yitzchak said: If one goes in without any intention of using it as a short cut, he may afterwards use it as a short cut. And R. Helbo said in the name of R. Huna: If one enters a synagogue to pray, he may afterwards use it as a short cut, as it says, “But when, the people of the land shall come before the Lord at the appointed times, he that enters by way of the north gate to worship shall go out by way of the south gate” (Ezekiel 46:9).
Berakhot
R. Abbahu said : If it was originally a public path, it is permitted [as a short cut for all]. R. Helbo said in the name of Rab Huna: Who enters a Synagogue to pray is allowed to use it as a short cut ; as it is said, "But when the people of the land shall come before the Lord in the appointed seasons, he that entereth by the way of the north gate to worship shall go forth by the way of the south gate" (Ezek. xlvi. 9).