"A bull or a sheep or a goat, when it is born, etc." (Leviticus 22:27). This is what Scripture says: "Your righteousness is like the mighty mountains; Your judgments are like the great deep" (Psalms 36:7). These are the righteous, who are compared to mountains, as it is said: "Hear, O mountains, the dispute of the LORD, etc." (Micah 6:2). "And Your judgments are like the great deep" — these are the wicked, as it is said: "And He cast off Pharaoh and his host into the Sea of Reeds" (Psalms 136:15).
Mountains and the Deep - The Righteous and the Wicked in Tanchuma
Midrash Tanchuma Buber, Emor 7:1
שור או כשב או עז כי יולד וגו' (ויקרא כב כז). זש"ה צדקתך כהררי אל משפטיך תהום רבה (תהלים לו ז), אלו הצדיקים שנמשלו בהרים, שנאמר שמעו הרים את ריב ה' וגו' (מיכה ו ב). ומשפטיך תהום רבה, אלו הן הרשעים, שנאמר ונער פרעה וחילו בים סוף (תהלים קלו טו).