יבמות י:ג · Yevamot 10:3

הָאִשָּׁה שֶׁהָלַךְ בַּעֲלָהּ וּבְנָהּ לִמְדִינַת הַיָּם, וּבָאוּ וְאָמְרוּ לָהּ, מֵת בַּעְלֵךְ וְאַחַר כָּךְ מֵת בְּנֵךְ, וְנִשֵּׂאת, וְאַחַר כָּךְ אָמְרוּ לָהּ, חִלּוּף הָיוּ הַדְּבָרִים, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן וְאַחֲרוֹן מַמְזֵר. אָמְרוּ לָהּ, מֵת בְּנֵךְ וְאַחַר כָּךְ מֵת בַּעְלֵךְ, וְנִתְיַבְּמָה, וְאַחַר כָּךְ אָמְרוּ לָהּ, חִלּוּף הָיוּ הַדְּבָרִים, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן וְאַחֲרוֹן מַמְזֵר. אָמְרוּ לָהּ, מֵת בַּעְלֵךְ, וְנִסֵּת, וְאַחַר כָּךְ אָמְרוּ לָהּ, קַיָּם הָיָה וּמֵת, תֵּצֵא, וְהַוָּלָד רִאשׁוֹן מַמְזֵר, וְהָאַחֲרוֹן אֵינוֹ מַמְזֵר. אָמְרוּ לָהּ, מֵת בַּעְלֵךְ, וְנִתְקַדְּשָׁה, וְאַחַר כָּךְ בָּא בַעְלָהּ, מֻתֶּרֶת לַחֲזֹר לוֹ. אַף עַל פִּי שֶׁנָּתַן לָהּ אַחֲרוֹן גֵּט, לֹא פְסָלָהּ מִן הַכְּהֻנָּה. אֶת זוֹ דָרַשׁ רַבִּי אֶלְעָזָר בֶּן מַתְיָא, וְאִשָּׁה גְּרוּשָׁה מֵאִישָׁהּ (ויקרא כא), וְלֹא מֵאִישׁ שֶׁאֵינוֹ אִישָׁהּ:
With regard to a woman whose husband and child went overseas, and witnesses came and said to her: Your husband died and afterward your child died, she does not require levirate marriage, as she had a child when her husband died. And for this reason she married another man. And if afterward they said to her that the matters were reversed, i.e., the child died before the husband, which means that she did require levirate marriage, she is therefore a yevama who married a stranger without ḥalitza and she must consequently leave her second husband. And with regard to the first child, the one born before they heard about the reversal, and the last one, born after they realized who actually died first, each of these children is a mamzer . Conversely, if they said to her: Your child died and afterward your husband died, and she therefore entered into levirate marriage, and afterward they said to her that the matters were reversed, which means she married her husband’s brother when there was no obligation of levirate marriage, she must leave her husband, and the first child and the last one are each a mamzer . If they said to her: Your husband died, and she married, and afterward they said to her that he was alive at the time of her marriage and he later died, she must leave the second husband. And the first child, born when her original husband was still alive, is a mamzer , and the last one, born after his death, is not a mamzer . If they said to her: Your husband died, and she became betrothed to another man, and afterward her husband came, she is permitted to return to him, as betrothal alone does not render her forbidden to her husband. Furthermore, although the last man, i.e., her betrothed, gave her a bill of divorce, he has not thereby disqualified her from marrying into the priesthood. She was never his wife, for the betrothal was invalid, and a bill of divorce given to the wife of another man does not disqualify her. This was taught by Rabbi Elazar ben Matya: The verse states with regard to priests: “Neither shall they take a woman divorced from her husband” (Leviticus 21:7), which indicates: And not one who was divorced from a man who is not her husband, e.g., the second man in this case.

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

הָאִשָּׁה → a woman [א - שׁ - ה]שֶׁהָלַךְ → whose... went [ה - ל - ך]בַּעֲלָהּ → husband [ב - ע - ל]וּבְנָהּ → and child [ב - נ - ה]לִמְדִינַת → to... province [ד - י - נ]הַיָּם → the sea (overseas) [י - ם]וּבָאוּ → and came [ב - ו - א]וְאָמְרוּ → and said [א - מ - ר]לָהּ → to her מֵת → died [מ - ו - ת]בַּעְלֵךְ → your husband [ב - ע - ל]וְאַחַר → and afterwards [א - ח - ר]כָּךְ → so מֵת → died [מ - ו - ת]בְּנֵךְ → your child [ב - נ - ה]וְנִשֵּׂאת → and she married [נ - שׂ - א]וְאַחַר → and afterwards [א - ח - ר]כָּךְ → so אָמְרוּ → they said [א - מ - ר]לָהּ → to her חִלּוּף → a reversal [ח - ל - ף]הָיוּ → were [ה - י - ה]הַדְּבָרִים → the matters [ד - ב - ר]תֵּצֵא → she must leave [י - צ - א]וְהַוָּלָד → and the child [י - ל - ד]רִאשׁוֹן → first [ר - א - שׁ]וְאַחֲרוֹן → and last [א - ח - ר]מַמְזֵר → mamzer [מ - ז - ר]אָמְרוּ → they said [א - מ - ר]לָהּ → to her מֵת → died [מ - ו - ת]בְּנֵךְ → your child [ב - נ - ה]וְאַחַר → and afterwards [א - ח - ר]כָּךְ → so מֵת → died [מ - ו - ת]