The wise one in his head of the matter knows what is at its end
The wise man foresees the course of events from the beginning. The wise man knows great things from the beginning, and he knows from the beginning the possible outcomes of every situation.
("The wise man has eyes in his head and in his body, the wise man has eyes in his head and the fool has eyes in his feet, but the wise man in the head of a matter knows what will be in its end" - Ecclesiastes Rabbah (Vilna) Parsha 2)
Translation
Expression (Hebrew)
הֶחָכָם-בְּרֹאשׁוֹ שֶׁל עִנְיַן יוֹדֵעַ מַה שֶּׁבְּסוֹפוֹ
Definition (Hebrew)
הָאָדָם הֶחָכָם צוֹפֶה מֵרֹאשׁ אֶת הִתְגַּלְגְּלוּת הָעִנְיָנִים. הֶחָכָם יוֹדֵעַ כְּבָר בַּהַתְחָלָה יוֹדֵעַ מֵרֹאשׁ מָהֵם הֲתַרְחִישֵׁם הָאֶפְשָׁרִיִּים בְּכָל מַצָּב.
("הֶחָכָם עֵינָיו בְּרֹאשׁוֹ וְגֵו', הֶחָכָם עֵינָיו בְּרֹאשׁוֹ וְהַכְּסִיל עֵינָיו בְּרַגְלָיו אֶלָּא עַד שֶׁהֶחָכָם בְּרֹאשׁוֹ שֶׁל עִנְיָן הוּא יוֹדֵעַ מָה יֵשׁ בְּסוֹפוֹ"-קֹהֶלֶת רַבָּה (וִילְנָא) פָּרָשָׁה ב)