Yevamos11: 3
חָמֵשׁ נָשִׁים שֶׁנִּתְעָרְבוּ וַלְדוֹתֵיהֶן, הִגְדִּילוּ הַתַּעֲרוֹבוֹת וְנָשְׂאוּ נָשִׁים וָמֵתוּ — אַרְבָּעָה חוֹלְצִין לְאַחַת, וְאֶחָד מְיַבֵּם אוֹתָהּ. הוּא וּשְׁלשָׁה חוֹלְצִין לָאַחֶרֶת, וְאֶחָד מְיַבֵּם. נִמְצְאוּ אַרְבַּע חֲלִיצוֹת וְיִבּוּם לְכָל אַחַת וְאֶחָת.
[If] the babies of five women became confused with one another, and they grew to adulthood, and married and died —- four perform chalitzah with one [widow], and one [may] perform yibum with her; he and three [others] perform chalitzah with another [widow], and one [may] perform yibum [with her]; thus, four chalitzos and one yibum [are performed] with each [widow].
Yevamos11: 4
הָאִשָּׁה שֶׁנִּתְעָרֵב וַלְדָהּ בִּוְלַד כַּלָּתָהּ, הִגְדִּילוּ הַתַּעֲרוֹבוֹת, וְנָשְׂאוּ נָשִׁים, וָמֵתוּ — בְּנֵי הַכַּלָּה חוֹלְצִין וְלֹא מְיַבְּמִין, שֶׁהוּא סְפֵק אֵשֶׁת אָחִיו סְפֵק אֵשֶׁת אֲחִי אָבִיו; וּבְנֵי הַזְּקֵנָה אוֹ חוֹלְצִין אוֹ מְיַבְּמִין, שֶׁהוּא סְפֵק אֵשֶׁת אָחִיו וְאֵשֶׁת בֶּן אָחִיו.  מֵתוּ הַכְּשֵׁרִים — בְּנֵי הַתַּעֲרוֹבוֹת לִבְנֵי הַזְּקֵנָה חוֹלְצִין וְלֹא מְיַבְּמִין, שֶׁהוּא סְפֵק אֵשֶׁת אָחִיו וְאֵשֶׁת אֲחִי אָבִיו; וּבְנֵי הַכַּלָּה אֶחָד חוֹלֵץ וְאֶחָד מְיַבֵּם.
[If] a woman's baby became confused with her daughter-in-law's baby, and they grew to adulthood, and married and died —- the sons of the daughter-in-law perform chalitzah, but may not perform yibum, because it is uncertain [which is] their brother's wife and [which is] their father's brother's wife; the sons of the grandmother [however] may perform either chalitzah or yibum, since [their] uncertainty is [which is] their brother's wife and [which is] their brother's son's wife.  [If] the certain ones died —- the uncertain sons perform chalitzah, but not yibum, with the grandmother's sons' [widows], because it is uncertain [which is] their brother's wife and [which is] their father's brother's wife; and [with] the daughter-in-law's sons' [widows], one [of the uncertain ones] performs chalitzah and the other may [then] perform yibum.