בבא בתרא ט:ב · Bava Batra 9:2

הִנִּיחַ בָּנִים וּבָנוֹת וְטֻמְטוּם, בִּזְמַן שֶׁהַנְּכָסִים מְרֻבִּים, הַזְּכָרִים דּוֹחִין אוֹתוֹ אֵצֶל נְקֵבוֹת. נְכָסִים מֻעָטִין, הַנְּקֵבוֹת דּוֹחוֹת אוֹתוֹ אֵצֶל זְכָרִים. הָאוֹמֵר אִם תֵּלֵד אִשְׁתִּי זָכָר יִטֹּל מָנֶה, יָלְדָה זָכָר, נוֹטֵל מָנֶה. נְקֵבָה מָאתַיִם, יָלְדָה נְקֵבָה, נוֹטֶלֶת מָאתָיִם. אִם זָכָר מָנֶה אִם נְקֵבָה מָאתַיִם, וְיָלְדָה זָכָר וּנְקֵבָה, זָכָר נוֹטֵל מָנֶה וְהַנְּקֵבָה נוֹטֶלֶת מָאתָיִם. יָלְדָה טֻמְטוּם, אֵינוֹ נוֹטֵל. אִם אָמַר כָּל מַה שֶּׁתֵּלֵד אִשְׁתִּי יִטֹּל, הֲרֵי זֶה יִטֹּל. וְאִם אֵין שָׁם יוֹרֵשׁ אֶלָּא הוּא, יוֹרֵשׁ אֶת הַכֹּל:
With regard to one who left behind sons and daughters and a tumtum , whose halakhic status as male or female is indeterminate, the halakha is as follows: When the estate is large the males direct the tumtum to the females and exclude him from the inheritance, claiming that perhaps the tumtum is female. When the estate is small, the females direct the tumtum to the males and exclude him from receiving sustenance, claiming that perhaps the tumtum is male. With regard to one who says: If my wife gives birth to a male the offspring shall receive a gift of one hundred dinars, if she in fact gave birth to a male, the offspring receives one hundred dinars. If he says: If my wife gives birth to a female the offspring shall receive a gift of two hundred dinars, if she in fact gave birth to a female, the offspring receives two hundred dinars. If he says: If my wife gives birth to a male the offspring shall receive a gift of one hundred dinars and if she gives birth to a female the offspring shall receive a gift of two hundred dinars, and in fact she gave birth to both a male and a female, the male offspring receives one hundred dinars and the female offspring receives two hundred dinars. If she gave birth to a tumtum , the tumtum does not receive anything. If he said: Whatever offspring my wife gives birth to shall receive a gift of a certain sum, and she gave birth to a tumtum , the tumtum receives it. And if there is no heir other than the tumtum , the tumtum inherits all of the estate.

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

הִנִּיחַ → left behind [ה - נ - ח]בָּנִים → sons [ב - נ - ה]וּבָנוֹת → and daughters [ב - נ - ה]וְטֻמְטוּם → and a tumtum [ט - מ - ט]בִּזְמַן → when שֶׁהַנְּכָסִים → the estate [נ - כ - ס]מְרֻבִּים → is large [ר - ב - ב]הַזְּכָרִים → the males [ז - כ - ר]דּוֹחִין → direct / push [ד - ח - ה]אוֹתוֹ → him אֵצֶל → to נְקֵבוֹת → the females [נ - ק - ב]נְכָסִים → estate [נ - כ - ס]מֻעָטִין → is small [מ - ע - ט]הַנְּקֵבוֹת → the females [נ - ק - ב]דּוֹחוֹת → direct / push [ד - ח - ה]אוֹתוֹ → him אֵצֶל → to זְכָרִים → the males [ז - כ - ר]הָאוֹמֵר → one who says [א - מ - ר]אִם → if תֵּלֵד → gives birth [י - ל - ד]אִשְׁתִּי → my wife [א - ש - ה]זָכָר → a male [ז - כ - ר]יִטֹּל → shall receive [נ - ט - ל]מָנֶה → one hundred יָלְדָה → she gave birth [י - ל - ד]זָכָר → to a male [ז - כ - ר]נוֹטֵל → receives [נ - ט - ל]מָנֶה → one hundred נְקֵבָה → female [נ - ק - ב]מָאתַיִם → two hundred יָלְדָה → she gave birth [י - ל - ד]נְקֵבָה → to a female [נ - ק - ב]נוֹטֶלֶת → receives [נ - ט - ל]