Anyone wanna help a small little bean in need?

Why is the inner core solid iron, even though it is the hottest part of the Earth?