Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is the latest year of a gratitude type mission with 99 in the entourage?

### Inputs:
table_name: table, columns: ['Year', 'Mission type', 'Shogun', 'Ryūkyūan King', 'Lead Envoy', 'Number in entourage']

### Response:
SELECT MAX Year FROM table WHERE Number in entourage = 99 AND Mission type = gratitude