בכורות א:ב · Bekhorot 1:2

פָּרָה שֶׁיָּלְדָה כְּמִין חֲמוֹר, וַחֲמוֹר שֶׁיָּלְדָה כְּמִין סוּס, פָּטוּר מִן הַבְּכוֹרָה, שֶׁנֶּאֱמַר פֶּטֶר חֲמוֹר פֶּטֶר חֲמוֹר, שְׁנֵי פְעָמִים, עַד שֶׁיְּהֵא הַיּוֹלֵד חֲמוֹר וְהַנּוֹלָד חֲמוֹר. וּמָה הֵם בַּאֲכִילָה. בְּהֵמָה טְהוֹרָה שֶׁיָּלְדָה כְּמִין בְּהֵמָה טְמֵאָה, מֻתָּר בַּאֲכִילָה. וּטְמֵאָה שֶׁיָּלְדָה כְּמִין בְּהֵמָה טְהוֹרָה, אָסוּר בַּאֲכִילָה, שֶׁהַיּוֹצֵא מֵהַטָּמֵא, טָמֵא. וְהַיּוֹצֵא מִן הַטָּהוֹר, טָהוֹר. דָּג טָמֵא שֶׁבָּלַע דָּג טָהוֹר, מֻתָּר בַּאֲכִילָה. וְטָהוֹר שֶׁבָּלַע דָּג טָמֵא, אָסוּר בַּאֲכִילָה, לְפִי שֶׁאֵינוֹ גִדּוּלָיו:
A cow that gave birth to a donkey of sorts and a donkey that gave birth to a horse of sorts are exempt from their offspring being counted a firstborn, as it is stated: “And every firstborn of a donkey you shall redeem with a lamb” (Exodus 13:13); “and the firstborn of a donkey you shall redeem with a lamb” (Exodus 34:20). The Torah states this halakha twice, indicating that one is not obligated unless both the birth mother is a donkey and the animal born is a donkey. And what is the halakhic status of offspring that are unlike the mother animal with regard to their consumption? In the case of a kosher animal that gave birth to a non-kosher animal of sorts, its consumption is permitted. And in the case of a non-kosher animal that gave birth to a kosher animal of sorts, its consumption is prohibited. This is because that which emerges from the non-kosher animal is non-kosher and that which emerges from the kosher animal is kosher. In the case of a non-kosher fish that swallowed a kosher fish, consumption of the kosher fish is permitted. And in the case of a kosher fish that swallowed a non-kosher fish, consumption of the non-kosher fish is prohibited due to the fact that the host fish is not the place of its development.

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

פָּרָה → A cow [פ - ר - ר]שֶׁיָּלְדָה → that gave birth [י - ל - ד]כְּמִין → to a sort of [מ - נ - ה]חֲמוֹר → donkey [ח - מ - ר]וַחֲמוֹר → and a donkey [ח - מ - ר]שֶׁיָּלְדָה → that gave birth [י - ל - ד]כְּמִין → to a sort of [מ - נ - ה]סוּס → horse [ס - ו - ס]פָּטוּר → is exempt [פ - ט - ר]מִן → from הַבְּכוֹרָה → the firstborn [ב - כ - ר]שֶׁנֶּאֱמַר → as it is stated [א - מ - ר]פֶּטֶר → firstborn of [פ - ט - ר]חֲמוֹר → a donkey [ח - מ - ר]פֶּטֶר → firstborn of [פ - ט - ר]חֲמוֹר → a donkey [ח - מ - ר]שְׁנֵי → two [ש - נ - ה]פְעָמִים → times [פ - ע - ם]עַד → until [ע - ד - ד]שֶׁיְּהֵא → there will be [ה - י - ה]הַיּוֹלֵד → the mother [י - ל - ד]חֲמוֹר → a donkey [ח - מ - ר]וְהַנּוֹלָד → and the offspring [י - ל - ד]חֲמוֹר → a donkey [ח - מ - ר]וּמָה → And what הֵם → are they בַּאֲכִילָה → regarding consumption [א - כ - ל]בְּהֵמָה → An animal [ב - ה - מ]טְהוֹרָה → kosher [ט - ה - ר]שֶׁיָּלְדָה → that gave birth [י - ל - ד]כְּמִין → to a sort of [מ - נ - ה]בְּהֵמָה → animal [ב - ה - מ]טְמֵאָה → non-kosher [ט - מ - א]מֻתָּר → is permitted [ת - ר - ר]בַּאֲכִילָה → for consumption [א - כ - ל]