Why among the three sons of Noah does Ham appear always to occupy the middle place, but the two extremities are varied; for when their birth is mentioned, Shem is placed in the first rank, in this manner, Shem, Ham, and Japhet; but when they are spoken of as fathers, then Japhet is mentioned first, and the beginning of the enumeration of the nations is derived from Japhet himself? (Genesis 10:1).
Why the Birth Order of Noah's Sons Keeps Changing
The Midrash of Philo 1:1