Yevamos3: 7
שְׁלֹשָׁה אַחִים, שְׁנַיִם מֵהֶן נְשׂוּאִים שְׁתֵּי אֲחָיוֹת, וְאֶחָד נָשׂוּי נָכְרִית, מֵת אֶחָד מִבַּעֲלֵי אֲחָיוֹת, וְכָנַס נָשׂוּי נָכְרִית אֶת אִשְׁתּוֹ, וּמֵתָה אִשְׁתּוֹ שֶׁל שֵׁנִי, וְאַחַר כָּךְ מֵת נָשׂוּי נָכְרִית — הֲרֵי זוֹ אֲסוּרָה עָלָיו עוֹלָמִית, הוֹאִיל וְנֶאֶסְרָה עָלָיו שָׁעָה אֶחָת.  שְׁלֹשָׁה אַחִים, שְׁנַיִם מֵהֶן נְשׂוּאִין שְׁתֵּי אֲחָיוֹת, וְאֶחָד נָשׂוּי נָכְרִית, גֵּרֵשׁ אֶחָד מִבַּעֲלֵי אֲחָיוֹת אֶת אִשְׁתּוֹ, וּמֵת נָשׂוּי נָכְרִית, וּכְנָסָהּ הַמְגָרֵשׁ, וָמֵת — זוֹ הִיא שֶׁאָמְרוּ: ,,וְכֻלָּן שֶׁמֵּתוּ אוֹ נִתְגָּרְשׁוּ — צָרוֹתֵיהֶן מֻתָּרוֹת”.
. [If there were] three brothers, [and] two of them were married to two sisters, while one was married to a stranger; [if] the husband of one of the sisters died, and the one married to the stranger married his wife, and the wife of the second one [then] died, and then the one married to the stranger died —- she is forbidden to him forever, since she was once forbidden to him.  [If there were] three brothers, [and] two of them were married to two sisters, while one was married to a stranger; [if] the husband of one of the sisters divorced his wife, and [then] the one [who was] married to the stranger died, and the divorced [brother] married her and [then] died —- about this it was said: If any of them died or were divorced, their co-wives are permitted.