This is the 8235th most frequent Polish word.
ostatniego
"Ostatniego" means "of the last" or "last" (in the genitive case).
In this sentence, 'ostatniego' is used as an adjective agreeing in gender, number, and case with the noun 'wieczoru,' specifying recency.
Widziałem go ostatniego wieczoru.
I saw him last evening.
Here, 'ostatniego' serves as a descriptive adjective matching the masculine singular form of 'szansa' in conjunction.
To była jego ostatniego szansa.
It was his last chance.
'Ostatniego' in this sentence indicates the finality of the occurrence, functioning adjectivally agreeing with 'razu' (genitive case).