The adjective expressions próximo, último, and pasado must agree with the gender of the noun they describe.