"And behold, three baskets of white bread on my head." These are the first three kingdoms. "And in the uppermost basket" — this is the fourth kingdom, which conscripts forced recruits from all the nations of the world. "And the bird ate them" — once it had eaten the uppermost, afterward it ate the lower one. He said to him: you brought me bad tidings, so I too bring you bad tidings; in three more days Pharaoh will lift up your head from upon you and hang you on a tree. (Genesis 40:20) "And it came to pass on the third day, the birthday of Pharaoh" — the day of his birth celebration. (Genesis 40:23) "And the chief cupbearer did not remember Joseph, and he forgot him." Every day he would set conditions, and an angel would come and overturn them; he would tie knots, and an angel would come and untie them. The Holy One, blessed be He, said to him: you forgot him, but I have not forgotten him.
Three Baskets on the Head and the Four Kingdoms
Yalkut Shimoni on Torah 147:3
וְהִנֵּה שְׁלֹשָׁה סַלֵּי חֹרִי עַל רֹאשִׁי. אֵלּוּ שָׁלֹשׁ מַלְכֻיּוֹת הָרִאשׁוֹנוֹת וּבַסַּל הָעֶלְיוֹן, זוּ מַלְכוּת הָרְבִיעִית שְׁהִיא מַכְתֶּבֶת טִירוּנְיָא מִכָּל אֻמּוֹת הָעוֹלָם. וְהָעוֹף אֹכֵל אֹתָם. מִשֶּׁאָכַל הָעֶלְיוֹן אַחַר כָּךְ אוֹכֵל הַתַּחְתּוֹן אָמַר לֵיהּ, אַתָּה בִּשַּׂרְתָּנִי בְּשׁוֹרָה רָעָה אַף אֲנִי מְבַשֶּׂרְךָ בְּשׁוֹרָה רָעָה, בְּעוֹד שְׁלֹשֶׁת יָמִים יִשָּׂא פַרְעֹה אֶת רֹאשְׁךָ מֵעָלֶיךָ וְתָלָה אוֹתְךָ עַל עֵץ. (בראשית מ כ) וַיְהִי בַּיּוֹם הַשְּׂלִישִׁי יוֹם הֻלֶּדֶת אֶת פַּרְעֹה. יוֹם גִּינוּסָא שֶׁלּוֹ. (בראשית מ כג) וְלֹא זָכַר שַׂר הַמַּשְׁקִים אֶת יוֹסֵף וַיִּשְכָּחֵהוּ. בְּכָל יוֹם הָיָה מַתְנֶה תְּנָאִים וּמַלְאָךְ בָּא וְהוֹפְכָן קוֹשֵׁר קְשָׁרִים וּמַלְאָךְ בָּא וּמַתִּירָן. אָמַר לוֹ הַקָּדוֹשׁ בָּרוּךְ הוּא, אַתָּה שְׁכַחְתּוֹ וַאֲנִי לֹא שְׁכַחְתִּיו.