Yevamos3: 9
שְׁלֹשָׁה אַחִין נְשׂוּאִין שָׁלֹשׁ נָכְרִיוֹת, וּמֵת אַחַד מֵהֶן, וְעָשָׂה בָהּ הַשֵּׁנִי מַאֲמָר, וָמֵת — הֲרֵי אֵלּוּ חוֹלְצוֹת וְלֹא מִתְיַבְּמוֹת, שֶׁנֶּאֱמַר [דברים כה, ה]: ,,וּמֵת אַחַד מֵהֶם . . . יְבָמָהּ יָבֹא עָלֶיהָ” — שֶׁעָלֶיהָ זִקַּת יָבָם אֶחָד, וְלֹא שֶׁעָלֶיהָ זִקַּת שְׁנֵי יְבָמִין. רַבִּי שִׁמְעוֹן אוֹמֵר: מְיַבֵּם לְאֵיזוֹ שֶׁיִּרְצֶה, וְחוֹלֵץ לַשְּׁנִיָּה.  שְׁנֵי אַחִין נְשׂוּאִין לִשְׁתֵּי אֲחָיוֹת, וּמֵת אַחַד מֵהֶן, וְאַחַר כָּךְ מֵתָה אִשְׁתּוֹ שֶׁל שֵׁנִי — הֲרֵי זוֹ אֲסוּרָה עָלָיו עוֹלָמִית, הוֹאִיל וְנֶאֶסְרָה עָלָיו שָׁעָה אֶחָת.
[If] three brothers were married to three strangers and one of them died, and [then] the second performed maamar with her and [also] died —- they require chalitzah, but may not be taken in yibum, as it is stated (Deut. 25:5): “. . . and one of them dies . . . her husband's brother shall come to her” —- [only a widow] who is attached by one brother's bond [is subject to yibum], not [a widow] who is attached by two brothers' bonds. R' Shimon says: He may perform yibum with whichever one he wishes, but he must [then] perform chalitzah with the other.  [If] two brothers were married to two sisters, and one of them died, and then the second one's wife died —- she is forbidden to him forever, because she was once forbidden to him.