What kingdoms was closest to the nile river