בבא בתרא א:ה · Bava Batra 1:5

כּוֹפִין אוֹתוֹ לִבְנוֹת בֵּית שַׁעַר וְדֶלֶת לֶחָצֵר. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר, לֹא כָל הַחֲצֵרוֹת רְאוּיוֹת לְבֵית שָׁעַר. כּוֹפִין אוֹתוֹ לִבְנוֹת לָעִיר חוֹמָה וּדְלָתַיִם וּבְרִיחַ. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר, לֹא כָל הָעֲיָרוֹת רְאוּיוֹת לְחוֹמָה. כַּמָּה יְהֵא בָעִיר וִיהֵא כְאַנְשֵׁי הָעִיר, שְׁנֵים עָשָׂר חֹדֶשׁ. קָנָה בָהּ בֵּית דִּירָה, הֲרֵי הוּא כְאַנְשֵׁי הָעִיר מִיָּד:
The residents of a courtyard can compel each inhabitant of that courtyard to financially participate in the building of a gatehouse and a door to the jointly owned courtyard. Rabban Shimon ben Gamliel disagrees and says: Not all courtyards require a gatehouse, and each courtyard must be considered on its own in accordance with its specific needs. Similarly, the residents of a city can compel each inhabitant of that city to contribute to the building of a wall, double doors, and a crossbar for the city. Rabban Shimon ben Gamliel disagrees and says: Not all towns require a wall. With regard to this latter obligation, the mishna asks: How long must one live in the city to be considered like one of the people of the city and therefore obligated to contribute to these expenses? Twelve months. But if he bought himself a residence in the city, he is immediately considered like one of the people of the city.

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

כּוֹפִין → they compel [כ - פ - ה]אוֹתוֹ → him לִבְנוֹת → to build [ב - נ - ה]בֵּית → a house of [ב - י - ת]שַׁעַר → a gate [ש - ע - ר]וְדֶלֶת → and a door [ד - ל - ת]לֶחָצֵר → for the courtyard [ח - צ - ר]רַבָּן → Rabban [ר - ב - ב]שִׁמְעוֹן → Shimon [ש - מ - ע]בֶּן → son of [ב - נ - ה]גַּמְלִיאֵל → Gamliel [ג - מ - ל]אוֹמֵר → says [א - מ - ר]לֹא → not כָל → all [כ - ל - ל]הַחֲצֵרוֹת → courtyards [ח - צ - ר]רְאוּיוֹת → are fit [ר - א - ה]לְבֵית → for a house of [ב - י - ת]שָׁעַר → a gate [ש - ע - ר]כּוֹפִין → they compel [כ - פ - ה]אוֹתוֹ → him לִבְנוֹת → to build [ב - נ - ה]לָעִיר → for the city [ע - י - ר]חוֹמָה → a wall [ח - מ - ה]וּדְלָתַיִם → and double doors [ד - ל - ת]וּבְרִיחַ → and a crossbar [ב - ר - ח]רַבָּן → Rabban [ר - ב - ב]שִׁמְעוֹן → Shimon [ש - מ - ע]בֶּן → son of [ב - נ - ה]גַּמְלִיאֵל → Gamliel [ג - מ - ל]אוֹמֵר → says [א - מ - ר]לֹא → not כָל → all [כ - ל - ל]הָעֲיָרוֹת → the towns [ע - י - ר]רְאוּיוֹת → are fit [ר - א - ה]לְחוֹמָה → for a wall [ח - מ - ה]