עבודה זרה ג:ו · Avodah Zarah 3:6

מִי שֶׁהָיָה בֵיתוֹ סָמוּךְ לַעֲבוֹדָה זָרָה וְנָפַל, אָסוּר לִבְנוֹתוֹ. כֵּיצַד יַעֲשֶׂה, כּוֹנֵס בְּתוֹךְ שֶׁלּוֹ אַרְבַּע אַמּוֹת וּבוֹנֶה. הָיָה שֶׁלּוֹ וְשֶׁל עֲבוֹדָה זָרָה, נִדּוֹן מֶחֱצָה עַל מֶחֱצָה. אֲבָנָיו עֵצָיו וַעֲפָרוֹ, מְטַמְּאִין כַּשֶּׁרֶץ, שֶׁנֶּאֱמַר (דברים ז) שַׁקֵּץ תְּשַׁקְּצֶנּוּ. רַבִּי עֲקִיבָא אוֹמֵר, כַּנִּדָּה, שֶׁנֶּאֱמַר (ישעיה ל) תִּזְרֵם כְּמוֹ דָוָה, צֵא תֹּאמַר לוֹ, מַה נִּדָּה מְטַמְּאָה בְמַשָּׂא, אַף עֲבוֹדָה זָרָה מְטַמְּאָה בְמַשָּׂא:
In the case of one whose house was adjacent to a house of idol worship and the dividing wall fell, it is prohibited to rebuild it. What should he do? He should withdraw into his own property four cubits and build the wall there. In talmudic times, external walls to homes were often built in two parts, with a functional space between them. If the space between the two parts of the wall belonged to him and to the house of idol worship, the area is treated as half and half with regard to withdrawing into his property before rebuilding the wall; he may build the wall four cubits from the middle of that space. The stones of the fallen wall, its wood, and its dust, transmit impurity like a creeping animal, i.e., one who touches them becomes impure like one who touches a creeping animal, as it is stated: “And you shall not bring an abomination into your house, and be accursed like it; you shall detest it [ shakketz teshakketzennu ], and you shall abhor it; for it is a proscribed item” (Deuteronomy 7:26). The term shakketz is used in a different form, shekketz , with regard to creeping animals. Rabbi Akiva says: Those items transmit impurity like a menstruating woman, as it is stated: “You will put them far away as a menstruating woman; you shall say to it: Go away” (Isaiah 30:22). Just as a menstruating woman transmits impurity by carrying, as one who moves a menstruating woman, even without touching her, becomes impure, so too, objects of idol worship transmit impurity by carrying.

Word-by-word Breakdown (מילים ושרשים)

מִי → one שֶׁהָיָה → whose house was [ה - י - ה]בֵיתוֹ → adjacent to סָמוּךְ → adjacent [ס - מ - כ]לַעֲבוֹדָה → idol [ע - ב - ד]זָרָה → worship [ז - ר - ה]וְנָפַל → and fell [נ - פ - ל]אָסוּר → prohibited [א - ס - ר]לִבְנוֹתוֹ → to rebuild it [ב - נ - ה]כֵּיצַד → What יַעֲשֶׂה → should he do? [ע - ש - ה]כּוֹנֵס → He withdraws [כ - נ - ס]בְּתוֹךְ → into שֶׁלּוֹ → his own [property] אַרְבַּע → four אַמּוֹת → cubits וּבוֹנֶה → and builds [ב - נ - ה]הָיָה → If it was [ה - י - ה]שֶׁלּוֹ → his וְשֶׁל → and of עֲבוֹדָה → idol [ע - ב - ד]זָרָה → worship [ז - ר - ה]נִדּוֹן → it is treated [ד - ו - נ]מֶחֱצָה → half [ח - צ - ה]עַל → by מֶחֱצָה → half [ח - צ - ה]אֲבָנָיו → Its stones [א - ב - ן]עֵצָיו → its wood [ע - צ - ה]וַעֲפָרוֹ → and its dust [ע - פ - ר]מְטַמְּאִין → transmit impurity [ט - מ - א]כַּשֶּׁרֶץ → like a creeping animal [ש - ר - צ]שֶׁנֶּאֱמַר → as it is stated [א - מ - ר]דברים → Deuteronomy [ד - ב - ר]ז → 7 שַׁקֵּץ → You shall detest [ש - ק - ץ]